diff --git a/libc/include/assert.h b/libc/include/assert.h index 22711c21d2..77d49bfa21 100644 --- a/libc/include/assert.h +++ b/libc/include/assert.h @@ -6,9 +6,9 @@ #include #ifdef NDEBUG - #define assert(ignore)((void) 0) + #define assert(ignore) ((void)0) #else - #define assert(expr) do { if (!(expr)) __assert_fail(#expr, __FILE__, __LINE__, __func__); } while (0) + #define assert(expr) ((expr) ? (void)0 : __assert_fail(#expr, __FILE__, __LINE__, __func__)) #endif __BEGIN_DECLS