summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/include/assert.h
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/dietlibc/include/assert.h')
-rw-r--r--mdk-stage1/dietlibc/include/assert.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/mdk-stage1/dietlibc/include/assert.h b/mdk-stage1/dietlibc/include/assert.h
index adf956022..bb573d0f2 100644
--- a/mdk-stage1/dietlibc/include/assert.h
+++ b/mdk-stage1/dietlibc/include/assert.h
@@ -15,9 +15,13 @@ extern void __assert_fail (__const char *__assertion, __const char *__file,
#endif
#undef assert
+#ifdef NDEBUG
+#define assert(expr)
+#else
# define assert(expr) \
((void) ((expr) ? 0 : \
(__assert_fail (#expr, \
__FILE__, __LINE__, __ASSERT_FUNCTION), 0)))
+#endif
#endif