changeset 22463:eb2db4c6e574

lib: Fix compiler warning about mixing boolean with multiplication
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Thu, 17 Aug 2017 13:14:16 +0300
parents 84f660d41c24
children 05b48dab5d29
files src/lib/macros.h
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/macros.h	Wed Aug 16 13:53:55 2017 +0300
+++ b/src/lib/macros.h	Thu Aug 17 13:14:16 2017 +0300
@@ -158,7 +158,7 @@
 
 #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