diff options
author | Michael Brown | 2010-09-11 14:05:40 +0200 |
---|---|---|
committer | Michael Brown | 2010-09-12 23:24:06 +0200 |
commit | 79dd00bb3a799b39c9e6202d9f4daf6cef4c28cd (patch) | |
tree | 0a88248960e29375e578ec05bb1d6c7a18e74af1 /src/include/compiler.h | |
parent | [multiboot] Reduce length of "Features" startup banner (diff) | |
download | ipxe-79dd00bb3a799b39c9e6202d9f4daf6cef4c28cd.tar.gz ipxe-79dd00bb3a799b39c9e6202d9f4daf6cef4c28cd.tar.xz ipxe-79dd00bb3a799b39c9e6202d9f4daf6cef4c28cd.zip |
[build] Remove unnecessary constraint on DBG_ENABLE()/DBG_DISABLE()
DBG_ENABLE() and DBG_DISABLE() are currently constrained to enabling
and disabling only debug levels that are compiled in for the current
object. For example, a DBG_ENABLE(DBGLVL_EXTRA) in foo.c will not be
able to affect output from other objects at DBGLVL_EXTRA unless foo.c
is itself compiled with DBGLVL_EXTRA enabled.
Partially fix by removing this unnecessary constraint. (Note that it
is still necessary for at least one debug level to be compiled in for
the object invoking DBG_ENABLE()/DBG_DISABLE().)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/compiler.h')
-rw-r--r-- | src/include/compiler.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/compiler.h b/src/include/compiler.h index 738655af..f3f71300 100644 --- a/src/include/compiler.h +++ b/src/include/compiler.h @@ -286,10 +286,10 @@ extern void dbg_more ( void ); int __debug_disable; #define DBGLVL ( DBGLVL_MAX & ~__debug_disable ) #define DBG_DISABLE( level ) do { \ - __debug_disable |= ( (level) & DBGLVL_MAX ); \ + __debug_disable |= (level); \ } while ( 0 ) #define DBG_ENABLE( level ) do { \ - __debug_disable &= ~( (level) & DBGLVL_MAX ); \ + __debug_disable &= ~(level); \ } while ( 0 ) #else #define DBGLVL 0 |