From 8005ef1672cb9d718c277a3c317688a1e36f5517 Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 20 Mar 1992 13:43:10 +0000 Subject: [PATCH] improved assert macro --- modules/src/assert/assert.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/src/assert/assert.h b/modules/src/assert/assert.h index 5fe28b2c6..50cbb98ec 100644 --- a/modules/src/assert/assert.h +++ b/modules/src/assert/assert.h @@ -7,10 +7,10 @@ #ifdef DEBUG #ifdef __STDC__ -#define assert(exp) (exp || _BadAssertion(__FILE__, __LINE__, #exp)) +#define assert(exp) ((exp) || _BadAssertion(__FILE__, __LINE__, #exp)) #else /* Note: this macro uses parameter substitution inside strings */ -#define assert(exp) (exp || _BadAssertion(__FILE__, __LINE__, "exp")) +#define assert(exp) ((exp) || _BadAssertion(__FILE__, __LINE__, "exp")) #endif #else #define assert(exp) (1)