aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/common.h
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-01-03 01:19:47 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2024-01-03 01:19:47 +0100
commitf0964d079d5af5aaba928bbb2c03bc7060e3e0ac (patch)
treed3d66fbdbc8ae8a5092185e185bdf38547f6954a /FICS/common.h
parent0ce905c057c3215d1fc1b1beb1900e206024afad (diff)
Redefined ASSERT()
Diffstat (limited to 'FICS/common.h')
-rw-r--r--FICS/common.h12
1 files changed, 5 insertions, 7 deletions
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 */