-#ifndef HEADER_DEBUG_H
-#define HEADER_DEBUG_H 1
+#ifndef __LIB_DEBUG_H
+#define __LIB_DEBUG_H
/* GCC lets us add "attributes" to functions, function
parameters, etc. to indicate their properties.
#undef NOT_REACHED
#ifndef NDEBUG
-#define ASSERT(CONDITION) \
- if (CONDITION) { } else { \
- PANIC ("assertion `%s' failed.", #CONDITION); \
- }
+#define ASSERT(CONDITION) \
+ ((void) ((CONDITION) || PANIC ("assertion `%s' failed.", #CONDITION)))
#define NOT_REACHED() PANIC ("executed an unreachable statement");
#else
#define ASSERT(CONDITION) ((void) 0)
#define NOT_REACHED() for (;;)
-#endif
+#endif /* lib/debug.h */