macro: don't rely on C's downgrade-to-bool feature for numeric comparisons

This commit is contained in:
Lennart Poettering 2018-04-11 21:36:52 +02:00
parent 42ce5f75bf
commit ce2090ab72

View file

@ -350,7 +350,7 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) {
({ \
typeof(x) _x_ = (x); \
unsigned ans = 1; \
while (_x_ /= 10) \
while ((_x_ /= 10) != 0) \
ans++; \
ans; \
})