diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/debug.h | 7 | ||||
-rw-r--r-- | source3/lib/util.c | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/source3/include/debug.h b/source3/include/debug.h index 284671c730..d8dafcbd45 100644 --- a/source3/include/debug.h +++ b/source3/include/debug.h @@ -176,11 +176,14 @@ extern bool *DEBUGLEVEL_CLASS_ISSET; #define unlikely(x) (x) #endif -#define DEBUGLVL( level ) \ +#define CHECK_DEBUGLVL( level ) \ ( ((level) <= MAX_DEBUG_LEVEL) && \ unlikely((DEBUGLEVEL_CLASS[ DBGC_CLASS ] >= (level))|| \ (!DEBUGLEVEL_CLASS_ISSET[ DBGC_CLASS ] && \ - DEBUGLEVEL_CLASS[ DBGC_ALL ] >= (level)) ) \ + DEBUGLEVEL_CLASS[ DBGC_ALL ] >= (level)) ) ) + +#define DEBUGLVL( level ) \ + ( CHECK_DEBUGLVL(level) \ && dbghdr( level, DBGC_CLASS, __FILE__, FUNCTION_MACRO, (__LINE__) ) ) diff --git a/source3/lib/util.c b/source3/lib/util.c index 11f3660df8..e5ac3752f5 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -2182,7 +2182,7 @@ void dump_data_pw(const char *msg, const uchar * data, size_t len) const char *tab_depth(int level, int depth) { - if( DEBUGLVL(level) ) { + if( CHECK_DEBUGLVL(level) ) { dbgtext("%*s", depth*4, ""); } return ""; |