freemyipod r204 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r203‎ | r204 | r205 >
Date:15:25, 6 September 2010
Author:theseven
Status:new
Tags:
Comment:
Only enable assertions if explicitly asked for
Modified paths:
  • /embios/trunk/libc/include/assert.h (modified) (history)

Diff [purge]

Index: embios/trunk/libc/include/assert.h
@@ -27,6 +27,10 @@
2828 #include "../../global.h"
2929 #include "../../panic.h"
3030
 31+#ifdef ENABLE_ASSERT
3132 #define assert(expr) if (!(expr)) panicf(PANIC_KILLTHREAD, "%s:%d: Assertion failed: %s", __FILE__, __LINE__, #expr)
 33+#else
 34+#define assert(expr)
 35+#endif
3236
3337 #endif