aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--simpl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/simpl.c b/simpl.c
index 99e09df..7186d2f 100644
--- a/simpl.c
+++ b/simpl.c
@@ -51,7 +51,7 @@ ulog2(uint64_t pow2)
static int
ispow2(uint64_t v)
{
- return (v & (v - 1)) == 0;
+ return v && (v & (v - 1)) == 0;
}
static void