[or-cvs] [tor/maint-0.2.2 2/2] Add missing parens to evdns_base_resolve_* macros while I am at it

nickm at torproject.org nickm at torproject.org
Wed Jan 12 18:58:04 UTC 2011


Author: Nick Mathewson <nickm at torproject.org>
Date: Sun, 9 Jan 2011 19:05:06 -0500
Subject: Add missing parens to evdns_base_resolve_* macros while I am at it
Commit: efc9a84108903edf1d68b9f0c511538f15fc7f52

---
 src/or/dns.c |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/or/dns.c b/src/or/dns.c
index 6393171..dcccd13 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -54,16 +54,19 @@ struct evdns_request;
   evdns_config_windows_nameservers()
 #define evdns_base_set_option_(base, opt, val) \
   evdns_set_option((opt),(val),DNS_OPTIONS_ALL)
-/* Note: our internal eventdns.c, plus libevent 1.4, used a 1 return to
+/* Note: our internal eventdns.c, plus Libevent 1.4, used a 1 return to
  * signify failure to launch a resolve. Libevent 2.0 uses a -1 return to
- * signify a failure on a resolve, though if we're on libevent 2.0, we should
+ * signify a failure on a resolve, though if we're on Libevent 2.0, we should
  * have event2/dns.h and never hit these macros.  Regardless, 0 is success. */
 #define evdns_base_resolve_ipv4(base, addr, options, cb, ptr) \
-  ((evdns_resolve_ipv4(addr, options, cb, ptr)!=0) ? NULL : ((void*)1))
-#define evdns_base_resolve_reverse(base, addr, options, cb, ptr) \
-  ((evdns_resolve_reverse(addr, options, cb, ptr)!=0) ? NULL : ((void*)1))
-#define evdns_base_resolve_reverse_ipv6(base, addr, options, cb, ptr) \
-  ((evdns_resolve_reverse_ipv6(addr, options, cb, ptr)!=0) ? NULL : ((void*)1))
+  ((evdns_resolve_ipv4((addr), (options), (cb), (ptr))!=0)    \
+   ? NULL : ((void*)1))
+#define evdns_base_resolve_reverse(base, addr, options, cb, ptr)        \
+  ((evdns_resolve_reverse((addr), (options), (cb), (ptr))!=0)           \
+   ? NULL : ((void*)1))
+#define evdns_base_resolve_reverse_ipv6(base, addr, options, cb, ptr)   \
+  ((evdns_resolve_reverse_ipv6((addr), (options), (cb), (ptr))!=0)      \
+   ? NULL : ((void*)1))
 
 #elif defined(LIBEVENT_VERSION_NUMBER) && LIBEVENT_VERSION_NUMBER < 0x02000303
 #define evdns_base_set_option_(base, opt, val) \
-- 
1.7.1



More information about the tor-commits mailing list