From 2fde4ba1b378a189620e001603bd6b35e293a7ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 4 Jan 2019 11:24:56 +0200 Subject: [PATCH] Fix MXS_ABORT_IF_FALSE macro The macro needs parentheses around the expression, otherwise the negation is applied in the wrong place. --- include/maxscale/alloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/maxscale/alloc.h b/include/maxscale/alloc.h index 774400362..a365e646e 100644 --- a/include/maxscale/alloc.h +++ b/include/maxscale/alloc.h @@ -74,6 +74,6 @@ char* mxs_strndup_a(const char* s, size_t n /*, const char *caller*/); * To be used in circumstances where a memory allocation or other * fatal error cannot - currently - be dealt with properly. */ -#define MXS_ABORT_IF_FALSE(b) do {if (!b) {abort();}} while (false) +#define MXS_ABORT_IF_FALSE(b) do {if (!(b)) {abort();}} while (false) MXS_END_DECLS