From 2c8259de19ac2f91de057149a2075c4aaf9206ef Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 17 Aug 2017 14:42:07 +0300 Subject: [PATCH] lib: Add missing parenthesis to timeout_add()'s msecs parameter checks This caused wrong results when the msecs parameter contained e.g. var?1:2 --- src/lib/ioloop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ioloop.h b/src/lib/ioloop.h index f42e7286b0..7c3c38e332 100644 --- a/src/lib/ioloop.h +++ b/src/lib/ioloop.h @@ -95,7 +95,7 @@ timeout_add(unsigned int msecs, const char *source_filename, timeout_add(msecs, __FILE__, __LINE__ + \ CALLBACK_TYPECHECK(callback, void (*)(typeof(context))) + \ COMPILE_ERROR_IF_TRUE(__builtin_constant_p(msecs) && \ - (msecs > 0 && msecs < 1000)), \ + ((msecs) > 0 && (msecs) < 1000)), \ (io_callback_t *)callback, context) struct timeout * timeout_add_short(unsigned int msecs, const char *source_filename, -- 2.47.3