(svn r18070) -Fix: some possible unwanted side effects if using some sorts of boolean expressions in DEBUG

This commit is contained in:
rubidium 2009-11-14 11:57:55 +00:00
parent 94261ad01a
commit 629b7fcfe5

View File

@ -29,7 +29,7 @@
#ifdef NO_DEBUG_MESSAGES #ifdef NO_DEBUG_MESSAGES
#define DEBUG(name, level, ...) { } #define DEBUG(name, level, ...) { }
#else /* NO_DEBUG_MESSAGES */ #else /* NO_DEBUG_MESSAGES */
#define DEBUG(name, level, ...) if (level == 0 || _debug_ ## name ## _level >= level) debug(#name, __VA_ARGS__) #define DEBUG(name, level, ...) if ((level) == 0 || _debug_ ## name ## _level >= (level)) debug(#name, __VA_ARGS__)
extern int _debug_ai_level; extern int _debug_ai_level;
extern int _debug_driver_level; extern int _debug_driver_level;