[tor-commits] [tor/master] Fix a bug in displaying IPv6 addrs in test_op_ipv6_ with --verbose
nickm at torproject.org
nickm at torproject.org
Wed Oct 12 00:09:39 UTC 2016
commit 0e1b228aa6b5ed7665ba5167a2b88924e58fb9b5
Author: Nick Mathewson <nickm at torproject.org>
Date: Tue Oct 11 19:22:46 2016 -0400
Fix a bug in displaying IPv6 addrs in test_op_ipv6_ with --verbose
The test code, if it failed, or if it was run in verbose mode, would
use the wrong variable for its loop. Patch from rubiate uploaded to
19999.
---
src/test/test_addr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/test/test_addr.c b/src/test/test_addr.c
index c8a9e6d..49e2480 100644
--- a/src/test/test_addr.c
+++ b/src/test/test_addr.c
@@ -85,8 +85,8 @@ test_addr_basic(void *arg)
char *, "%s", \
{ char *cp; \
cp = print_ = tor_malloc(64); \
- for (int ii_=0;i<16;++i) { \
- tor_snprintf(cp, 3,"%02x", (unsigned)value_->s6_addr[i]);\
+ for (int ii_=0;ii_<16;++ii_) { \
+ tor_snprintf(cp, 3,"%02x", (unsigned)value_->s6_addr[ii_]); \
cp += 2; \
if (ii_ != 15) *cp++ = ':'; \
} \
More information about the tor-commits
mailing list