diff options
author | dzwdz | 2022-08-26 14:16:16 +0200 |
---|---|---|
committer | dzwdz | 2022-08-26 14:16:16 +0200 |
commit | e6584db26da34572fb13aa236e16e19f71c8e976 (patch) | |
tree | 055c528765e986bc8ed6706cec84289e50b46ed6 /src/shared/include | |
parent | ffdf0e8d93f8e98ed9d5a8270feb2a19eb9659e3 (diff) |
user/libc: prepare for OpenED port
Diffstat (limited to 'src/shared/include')
-rw-r--r-- | src/shared/include/assert.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/shared/include/assert.h b/src/shared/include/assert.h index 7adf297..7520aa9 100644 --- a/src/shared/include/assert.h +++ b/src/shared/include/assert.h @@ -1,3 +1,7 @@ -#pragma once +#ifdef NDEBUG +#define assert(stmt) do {} while (0) +#else #define assert(stmt) do { if (!(stmt)) __badassert(__func__, __FILE__, __LINE__); } while (0) +#endif + _Noreturn void __badassert(const char *func, const char *file, int line); |