aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
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/or/main.c
parent93f32db438cff63662761374f4a69b710f3d71d9 (diff)
downloadtor-5adfa09fce2c61239f9a7fa5fb154282f802af0a.tar
tor-5adfa09fce2c61239f9a7fa5fb154282f802af0a.tar.gz
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/or/main.c')
-rw-r--r--src/or/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 9d75f9138..913f299fc 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1965,7 +1965,7 @@ nt_service_loadlibrary(void)
goto err;
}
-#define LOAD(f) do { \
+#define LOAD(f) STMT_BEGIN \
if (!(fn = GetProcAddress(library, #f))) { \
log_err(LD_BUG, \
"Couldn't find %s in advapi32.dll! We probably got the " \
@@ -1974,7 +1974,7 @@ nt_service_loadlibrary(void)
} else { \
service_fns.f ## _fn = fn; \
} \
- } while (0)
+ STMT_END
LOAD(ChangeServiceConfig2A);
LOAD(CloseServiceHandle);