]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Fix compiler warning about mixing boolean with multiplication
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 17 Aug 2017 10:14:16 +0000 (13:14 +0300)
committerTimo Sirainen <tss@dovecot.fi>
Thu, 17 Aug 2017 11:59:14 +0000 (14:59 +0300)
src/lib/macros.h

index 4f95dc4f98f38cc7c1d1a6d5930bda8e0383f819..dc4d66db962d29fdacc8b8988e334fccdf76c4b4 100644 (file)
 
 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)) && !defined(__cplusplus)
 #  define COMPILE_ERROR_IF_TRUE(condition) \
-       (sizeof(char[1 - 2 * !!(condition)]) - 1)
+       (sizeof(char[1 - 2 * ((condition) ? 1 : 0)]) - 1)
 #else
 #  define COMPILE_ERROR_IF_TRUE(condition) 0
 #endif