From f0964d079d5af5aaba928bbb2c03bc7060e3e0ac Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Wed, 3 Jan 2024 01:19:47 +0100 Subject: Redefined ASSERT() --- FICS/common.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'FICS/common.h') diff --git a/FICS/common.h b/FICS/common.h index b8afce6..51ea256 100644 --- a/FICS/common.h +++ b/FICS/common.h @@ -26,8 +26,9 @@ #ifndef _COMMON_H #define _COMMON_H -#include "vers.h" +#include "assert_error.h" #include "legal.h" +#include "vers.h" #define PUBLIC #define PRIVATE static @@ -45,12 +46,9 @@ #ifdef DEBUG #define ASSERT(expression) \ - while (((expression) ? 0 : \ - (fprintf (stderr, "Assertion failed: file %s, line %d.\n", \ - __FILE__, __LINE__), \ - abort (), 0))) + ((void) ((expression)||_assert_error(__FILE__, __LINE__))) #else -#define ASSERT(expression) while(0) -#endif /* DEBUG */ +#define ASSERT(expression) ((void) 0) +#endif #endif /* _COMMON_H */ -- cgit v1.2.3