Fix MXS_ABORT_IF_FALSE macro

The macro needs parentheses around the expression, otherwise the negation
is applied in the wrong place.
This commit is contained in:
Markus Mäkelä 2019-01-04 11:24:56 +02:00
parent fe4c848079
commit 2fde4ba1b3
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -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