projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
420b9b4
)
Revert to previous version.
author
Ben Pfaff
<blp@cs.stanford.edu>
Mon, 18 Oct 2004 23:54:56 +0000
(23:54 +0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Mon, 18 Oct 2004 23:54:56 +0000
(23:54 +0000)
src/lib/debug.h
patch
|
blob
|
history
diff --git
a/src/lib/debug.h
b/src/lib/debug.h
index 76c3f77b732f8aa807847fb9be13a7af91c2bb8d..947dff204f17fab746107a8def7b097d23a3db52 100644
(file)
--- a/
src/lib/debug.h
+++ b/
src/lib/debug.h
@@
-37,8
+37,10
@@
void debug_backtrace (void);
#undef NOT_REACHED
#ifndef NDEBUG
-#define ASSERT(CONDITION) \
- ((void) ((CONDITION) || PANIC ("assertion `%s' failed.", #CONDITION)))
+#define ASSERT(CONDITION) \
+ if (CONDITION) { } else { \
+ PANIC ("assertion `%s' failed.", #CONDITION); \
+ }
#define NOT_REACHED() PANIC ("executed an unreachable statement");
#else
#define ASSERT(CONDITION) ((void) 0)