prevent bogus simplifications

This commit is contained in:
Quentin Carbonneaux 2024-06-17 13:18:05 +02:00
parent e7ebdc8fb6
commit 0631bc4fec

View file

@ -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