Mercurial > dovecot > core-2.2
changeset 22557:3bc39c7ae7ff
lib: Fix warning with gcc7's -Wint-in-bool-context
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Thu, 05 Oct 2017 12:47:17 +0300 |
parents | ba71422dc32f |
children | a9c51256847e |
files | src/lib/buffer.h |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/buffer.h Thu Aug 24 14:59:07 2017 +0300 +++ b/src/lib/buffer.h Thu Oct 05 12:47:17 2017 +0300 @@ -20,10 +20,10 @@ const void *data, size_t size); #if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) > 401 #define buffer_create_from_data(b,d,s) ({ \ - (void)COMPILE_ERROR_IF_TRUE(__builtin_object_size((d),1) < ((s)?(s):1)); \ + (void)COMPILE_ERROR_IF_TRUE(__builtin_object_size((d),1) < ((s)>0?(s):1)); \ buffer_create_from_data((b), (d), (s)); }) #define buffer_create_from_const_data(b,d,s) ({ \ - (void)COMPILE_ERROR_IF_TRUE(__builtin_object_size((d),1) < ((s)?(s):1)); \ + (void)COMPILE_ERROR_IF_TRUE(__builtin_object_size((d),1) < ((s)>0?(s):1)); \ buffer_create_from_const_data((b), (d), (s)); }) #endif /* Creates a dynamically growing buffer. Whenever write would exceed the