diff options
| -rw-r--r-- | util.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -6,6 +6,7 @@ #ifndef UTIL_H #define UTIL_H +#include <assert.h> #include <stdlib.h> #include <stdarg.h> #include <stdbool.h> @@ -50,7 +51,7 @@ void abort_with_msg(const char *fmt, ...) */ #ifndef NDEBUG #define assert_with_msg(expr, ...) \ - ((expr) ? (void)0 : abort_with_msg(__VA_ARGS__)) + (1 ? (void)0 : ((void)(expr), abort_with_msg(__VA_ARGS__))) /* The standard library assert() hits our seccomp filter and dies before it can * actually print a message. So, replace it with our own version. */ @@ -60,7 +61,7 @@ void abort_with_msg(const char *fmt, ...) __func__, __FILE__, __LINE__, STRINGIFY(expr)) #else #define assert_with_msg(expr, ...) \ - ((void)(expr), 0 ? (void)0 : abort_with_msg(__VA_ARGS__)) + ((void)(expr), 1 ? (void)0 : abort_with_msg(__VA_ARGS__)) #endif #ifdef P_tmpdir |
