projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add warnings for missing disks with various projects.
[pintos-anon]
/
src
/
lib
/
debug.h
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
#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)
#define NOT_REACHED() PANIC ("executed an unreachable statement");
#else
#define ASSERT(CONDITION) ((void) 0)