From ce2090ab72bf629f896f37b039135c064ea8a29f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 11 Apr 2018 21:36:52 +0200 Subject: [PATCH] macro: don't rely on C's downgrade-to-bool feature for numeric comparisons --- src/basic/macro.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/macro.h b/src/basic/macro.h index 6b3c3d0..cd3ae8d 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; \ }) -- 2.7.4