summaryrefslogtreecommitdiff
path: root/src/common/ht.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/ht.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/ht.h')
-rw-r--r--src/common/ht.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/common/ht.h b/src/common/ht.h
index 63629c3ac6..72fe5e2cb0 100644
--- a/src/common/ht.h
+++ b/src/common/ht.h
@@ -79,9 +79,7 @@ ht_string_hash(const char *s)
}
#define _HT_SET_HASH(elm, field, hashfn) \
- do { \
- (elm)->field.hte_hash = hashfn(elm); \
- } while (0)
+ (elm)->field.hte_hash = hashfn(elm)
#define HT_FOREACH(x, name, head) \
for ((x) = HT_START(name, head); \