diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-06-17 18:22:39 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-06-17 18:22:39 +0000 |
commit | 5adfa09fce2c61239f9a7fa5fb154282f802af0a (patch) | |
tree | ffd522053a544617737cc38128c2e315dce464b1 /src/tools/tor-resolve.c | |
parent | 93f32db438cff63662761374f4a69b710f3d71d9 (diff) | |
download | tor-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/tools/tor-resolve.c')
-rw-r--r-- | src/tools/tor-resolve.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/tor-resolve.c b/src/tools/tor-resolve.c index 6fabd5d337..c23a463ed7 100644 --- a/src/tools/tor-resolve.c +++ b/src/tools/tor-resolve.c @@ -41,8 +41,8 @@ #define RESPONSE_LEN_4 8 #define log_sock_error(act, _s) \ - do { log_fn(LOG_ERR, LD_NET, "Error while %s: %s", act, \ - tor_socket_strerror(tor_socket_errno(_s))); } while (0) + STMT_BEGIN log_fn(LOG_ERR, LD_NET, "Error while %s: %s", act, \ + tor_socket_strerror(tor_socket_errno(_s))); STMT_END static void usage(void) ATTR_NORETURN; |