LibC: Make assert() macro a void expression

This commit is contained in:
Bananymous 2024-06-17 16:49:26 +03:00
parent 15f8c7014f
commit d7eb321d58
1 changed files with 2 additions and 2 deletions

View File

@ -6,9 +6,9 @@
#include <sys/cdefs.h>
#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