From: hno <> Date: Fri, 18 Mar 2005 22:48:22 +0000 (+0000) Subject: do_debug(section, level), a macro to conditionally check if a certain X-Git-Tag: SQUID_3_0_PRE4~838 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8250688c4898d1471fa8466fe38d6c336d2ce560;p=thirdparty%2Fsquid.git do_debug(section, level), a macro to conditionally check if a certain debug level is active. --- diff --git a/src/defines.h b/src/defines.h index 5aa986750c..8c8a5bc822 100644 --- a/src/defines.h +++ b/src/defines.h @@ -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; }