mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
macro: don't rely on C's downgrade-to-bool feature for numeric comparisons
This commit is contained in:
parent
42ce5f75bf
commit
ce2090ab72
@ -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; \
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user