]> mj.ucw.cz Git - libucw.git/blobdiff - lib/lib.h
Fixed a bug in parsing of replies -- the parse tree of each card was trimmed
[libucw.git] / lib / lib.h
index a19128890e27d5915535b5b7ec08c374412b49fe..c2ec50b03d8516ca8f004ec5922a03e9c7a1b51d 100644 (file)
--- a/lib/lib.h
+++ b/lib/lib.h
@@ -71,12 +71,13 @@ void log_file(byte *name);
 void log_fork(void);
 void log_switch(void);
 
-#ifdef CONFIG_DEBUG
 void assert_failed(char *assertion, char *file, int line) NONRET;
+void assert_failed_noinfo(void) NONRET;
+
+#ifdef DEBUG_ASSERTS
 #define ASSERT(x) do { if (unlikely(!(x))) assert_failed(#x, __FILE__, __LINE__); } while(0)
 #else
-void assert_failed(void) NONRET;
-#define ASSERT(x) do { if (__builtin_constant_p(x) && !(x)) assert_failed(); } while(0)
+#define ASSERT(x) do { if (__builtin_constant_p(x) && !(x)) assert_failed_noinfo(); } while(0)
 #endif
 
 #define COMPILE_ASSERT(name,x) typedef char _COMPILE_ASSERT_##name[!!(x)-1]