diff options
author | Michael Adam <obnox@samba.org> | 2008-01-23 00:30:28 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-01-23 08:16:37 +0100 |
commit | cbc7d921fa696e6c3c5197ad9f87442ba679df82 (patch) | |
tree | 2d0a4a33c662f60b1d3598bf1303fd2e70828a05 /source/include/debug.h | |
parent | bc2973df8504850a40cb0a1172689dc0bdafa323 (diff) | |
download | samba-cbc7d921fa696e6c3c5197ad9f87442ba679df82.tar.gz samba-cbc7d921fa696e6c3c5197ad9f87442ba679df82.tar.xz samba-cbc7d921fa696e6c3c5197ad9f87442ba679df82.zip |
Fix tab_depth: it should not create an extra debug header.
In pstring removal 4ae4b23586, the behaviour of tab_depth was
changed to create an extra debug header (by using the DEBUGLVL
macro).
This extracts the debug level check from DEBUGLVL into
a macro CHECK_DEBUGLVL without the debug header creation
and uses this instead of DEBUGLVL in tab_depth.
Michael
Diffstat (limited to 'source/include/debug.h')
-rw-r--r-- | source/include/debug.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/include/debug.h b/source/include/debug.h index 284671c730f..d8dafcbd457 100644 --- a/source/include/debug.h +++ b/source/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__) ) ) |