diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-08-09 13:12:09 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-08-09 13:12:09 +0000 |
commit | 5a5049cd77c608134c87a2332b8a070c01731680 (patch) | |
tree | 9e7aaecd109e052faa4b0e119adbd6a62ff795a8 /source3/include | |
parent | 660743c08b75135a66eaabb81907d7983147ea14 (diff) | |
download | samba-5a5049cd77c608134c87a2332b8a070c01731680.tar.gz samba-5a5049cd77c608134c87a2332b8a070c01731680.tar.bz2 samba-5a5049cd77c608134c87a2332b8a070c01731680.zip |
removed the if statements from the DEBUG() macro definitions.
Chris, you should never put if statements in macros, use the ugly
(a?b:c) form instead, otherwise you can produce incorrect code when
you have things like:
if (foo)
DEBUG((blah));
else
DEBUG((blooh));
(This used to be commit ab912448c1ff2487b6a313574d72f389baa65e6d)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/smb.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h index b33db0ce66..f8a055ad48 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -142,12 +142,12 @@ BOOL dbgtext(); && dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) ) ) #define DEBUG( level, body ) \ - if( (DEBUGLEVEL>=(level)) \ - && dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) ) ) \ - (void)dbgtext body + ((DEBUGLEVEL>=(level) && \ + dbghdr(level, FILE_MACRO, FUNCTION_MACRO, (__LINE__)))? \ + (void)dbgtext body:0) #define DEBUGADD( level, body ) \ - if( DEBUGLEVEL>=(level) ) (void)dbgtext body + (DEBUGLEVEL>=(level)?(void)dbgtext body:0); /* End Debugging code section. * -------------------------------------------------------------------------- ** |