summaryrefslogtreecommitdiff
path: root/kern/assert.h
diff options
context:
space:
mode:
Diffstat (limited to 'kern/assert.h')
-rw-r--r--kern/assert.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/kern/assert.h b/kern/assert.h
index 2829728b..7b66d1b1 100644
--- a/kern/assert.h
+++ b/kern/assert.h
@@ -29,26 +29,21 @@
/* assert.h 4.2 85/01/21 */
-#include <kern/macro_help.h>
+#include <kern/macros.h>
#ifndef NDEBUG
#define MACH_ASSERT 1
#endif
#if MACH_ASSERT
-extern void Assert(char *exp, char *filename, int line) __attribute__ ((noreturn));
+extern void Assert(const char *exp, const char *filename, int line) __attribute__ ((noreturn));
#define assert(ex) \
-MACRO_BEGIN \
- if (!(ex)) \
- Assert(#ex, __FILE__, __LINE__); \
-MACRO_END
-
-#ifdef lint
-#define assert_static(x)
-#else /* lint */
+ ((ex) \
+ ? (void) (0) \
+ : Assert (#ex, __FILE__, __LINE__))
+
#define assert_static(x) assert(x)
-#endif /* lint */
#else /* MACH_ASSERT */
#define assert(ex)