From: Lennart Poettering Date: Wed, 11 Apr 2018 19:36:52 +0000 (+0200) Subject: macro: don't rely on C's downgrade-to-bool feature for numeric comparisons X-Git-Tag: v239~417^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ce2090ab72bf629f896f37b039135c064ea8a29f;p=thirdparty%2Fsystemd.git macro: don't rely on C's downgrade-to-bool feature for numeric comparisons --- diff --git a/src/basic/macro.h b/src/basic/macro.h index 6b3c3d04df9..cd3ae8d3ab7 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; \ })