aboutsummaryrefslogtreecommitdiff
path: root/libc/inc/assert.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc/inc/assert.h')
-rw-r--r--libc/inc/assert.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/libc/inc/assert.h b/libc/inc/assert.h
index e42fc5a..3656c33 100644
--- a/libc/inc/assert.h
+++ b/libc/inc/assert.h
@@ -18,12 +18,9 @@
__asm__ volatile("cli\nhlt"); \
}
#elif defined(userspace)
-#include <sys.h>
#define assert(exp) \
- if (!(exp)) { \
- printf("%s:%d: %s: Assertion '%s' failed\n", __FILE__, __LINE__, __func__, #exp); \
- exit(1); \
- }
+ if (!(exp)) \
+ err(1, "%s:%d: %s: Assertion '%s' failed\n", __FILE__, __LINE__, __func__, #exp);
#else
#error "No lib target specified. Please use -Dkernel or -Duserspace"
#endif