aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorDavid Fifield <david@bamsoftware.com>2012-10-06 21:25:25 -0700
committerNick Mathewson <nickm@torproject.org>2012-10-10 22:25:30 -0400
commit8419d184411e8cd9457346a7a3d5f9734211a8b2 (patch)
treed97f5e28e33089a948ca958253bdd86aa9b3ab13 /src/or/dirserv.c
parent78e2d8c7a85c8ec2defe5d1873ae19ba9b82b14c (diff)
downloadtor-8419d184411e8cd9457346a7a3d5f9734211a8b2.tar.gz
tor-8419d184411e8cd9457346a7a3d5f9734211a8b2.zip
Use fmt_addrport where appropriate.
This is mostly a conversion from this pattern: log("... %s:%d ...", fmt_and_decorate_addr(&addr), port); to this: log("... %s ...", fmt_addrport(&addr, port)); The output is the same in all cases.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 0d98324bfd..71c019701b 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -2116,11 +2116,9 @@ routerstatus_format_entry(char *buf, size_t buf_len,
/* Possible "a" line. At most one for now. */
if (!tor_addr_is_null(&rs->ipv6_addr)) {
- const char *addr_str = fmt_and_decorate_addr(&rs->ipv6_addr);
r = tor_snprintf(cp, buf_len - (cp-buf),
- "a %s:%d\n",
- addr_str,
- (int)rs->ipv6_orport);
+ "a %s\n",
+ fmt_addrport(&rs->ipv6_addr, rs->ipv6_orport));
if (r<0) {
log_warn(LD_BUG, "Not enough space in buffer.");
return -1;