prevent bogus simplifications
This commit is contained in:
parent
e7ebdc8fb6
commit
0631bc4fec
1 changed files with 1 additions and 1 deletions
2
simpl.c
2
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
|
||||
|
|
Loading…
Add table
Reference in a new issue