]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
do_debug(section, level), a macro to conditionally check if a certain
authorhno <>
Fri, 18 Mar 2005 22:48:22 +0000 (22:48 +0000)
committerhno <>
Fri, 18 Mar 2005 22:48:22 +0000 (22:48 +0000)
debug level is active.

src/defines.h

index 5aa986750cfef3ce2497471e1de45d2474e82519..8c8a5bc8222f2b3ba6566694ca6db36ec6762cdd 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: defines.h,v 1.116 2005/01/03 16:08:26 robertc Exp $
+ * $Id: defines.h,v 1.117 2005/03/18 15:48:22 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -66,8 +66,9 @@
 #define COMM_REUSEADDR         0x04
 
 #include "Debug.h"
+#define do_debug(SECTION, LEVEL) ((Debug::level = (LEVEL)) > Debug::Levels[SECTION])
 #define debug(SECTION, LEVEL) \
-        ((Debug::level = (LEVEL)) > Debug::Levels[SECTION]) ? (void) 0 : _db_print
+        do_debug(SECTION, LEVEL) ? (void) 0 : _db_print
 
 #define safe_free(x)   if (x) { xxfree(x); x = NULL; }