summaryrefslogtreecommitdiff
path: root/src/common/log.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-06-17 18:22:39 +0000
committerNick Mathewson <nickm@torproject.org>2007-06-17 18:22:39 +0000
commit5adfa09fce2c61239f9a7fa5fb154282f802af0a (patch)
treeffd522053a544617737cc38128c2e315dce464b1 /src/common/log.h
parent93f32db438cff63662761374f4a69b710f3d71d9 (diff)
downloadtor-5adfa09fce2c61239f9a7fa5fb154282f802af0a.tar.gz
tor-5adfa09fce2c61239f9a7fa5fb154282f802af0a.zip
r13477@catbus: nickm | 2007-06-17 14:22:03 -0400
Sun CC likes to give warnings for the do { } while(0) construction for making statement-like macros. Define STMT_BEGIN/STMT_END macros that do the right thing, and use them everywhere. svn:r10645
Diffstat (limited to 'src/common/log.h')
-rw-r--r--src/common/log.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/log.h b/src/common/log.h
index f451599d00..01ab82de7e 100644
--- a/src/common/log.h
+++ b/src/common/log.h
@@ -131,10 +131,10 @@ void _log_fn(int severity, uint32_t domain,
#define log_fn(severity, domain, args...) \
_log_fn(severity, domain, __PRETTY_FUNCTION__, args)
#define log_debug(domain, args...) \
- do { \
+ STMT_BEGIN \
if (PREDICT_UNLIKELY(_log_global_min_severity == LOG_DEBUG)) \
_log_fn(LOG_DEBUG, domain, __PRETTY_FUNCTION__, args); \
- } while (0)
+ STMT_END
#define log_info(domain, args...) \
_log_fn(LOG_INFO, domain, __PRETTY_FUNCTION__, args)
#define log_notice(domain, args...) \