From: Ben Pfaff Date: Mon, 18 Oct 2004 23:54:56 +0000 (+0000) Subject: Revert to previous version. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46b2f824499f085e92d847e8d3f7b2844ec6cca2;p=pintos-anon Revert to previous version. --- diff --git a/src/lib/debug.h b/src/lib/debug.h index 76c3f77..947dff2 100644 --- 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)