diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-04-11 21:36:52 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-08-24 16:47:08 +0200 |
commit | a8593f31bbf22793a2006616c2c91a2a0522a063 (patch) | |
tree | 94c1643ae08cec297ecae873aa2c7911cdeb2451 /src/basic/macro.h | |
parent | 35be4ab29261bb0d6f524a5101ad92aabbe4c58a (diff) |
macro: don't rely on C's downgrade-to-bool feature for numeric comparisons
Diffstat (limited to 'src/basic/macro.h')
-rw-r--r-- | src/basic/macro.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/macro.h b/src/basic/macro.h index 6b3c3d04d..cd3ae8d3a 100644 --- a/src/basic/macro.h +++ b/src/basic/macro.h @@ -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; \ }) |