diff options
author | Linus Nordberg <linus@nordberg.se> | 2012-05-31 18:34:12 +0200 |
---|---|---|
committer | Linus Nordberg <linus@torproject.org> | 2012-07-19 18:21:23 +0200 |
commit | dee4f068ee8be3d424aaa300168564f4abd18a36 (patch) | |
tree | 55cb7f631d3867807c51cb98c95878475b82bbd9 | |
parent | 0fe6dde4b24fde9a63326e6cf9fd71e2247621c7 (diff) | |
download | tor-dee4f068ee8be3d424aaa300168564f4abd18a36.tar tor-dee4f068ee8be3d424aaa300168564f4abd18a36.tar.gz |
Don't shadow 'buf'.
-rw-r--r-- | src/or/dirserv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 6f1646954..7020d5b2a 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2091,10 +2091,10 @@ routerstatus_format_entry(char *buf, size_t buf_len, /* Possible "a" line, not included in consensus for now. */ if (!tor_addr_is_null(&rs->ipv6_addr)) { - char buf[TOR_ADDR_BUF_LEN]; + const char *addr_str = fmt_and_decorate_addr(&rs->ipv6_addr); r = tor_snprintf(cp, buf_len - (cp-buf), "a %s:%d\n", - tor_addr_to_str(buf, &rs->ipv6_addr, sizeof(buf), 1), + addr_str, (int)rs->ipv6_orport); if (r<0) { log_warn(LD_BUG, "Not enough space in buffer."); |