diff options
author | Roger Dingledine <arma@torproject.org> | 2010-10-01 21:31:09 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2010-10-01 21:31:09 -0400 |
commit | 22f723e4a3fc32983480c7403af9d7e77a3200ea (patch) | |
tree | b33e4fec4ffa0e350e5c4193e050cb3441e2958e /src/or/router.c | |
parent | 165aaf560a7249a388e916659d55ec6fa1d2fd24 (diff) | |
download | tor-22f723e4a3fc32983480c7403af9d7e77a3200ea.tar tor-22f723e4a3fc32983480c7403af9d7e77a3200ea.tar.gz |
refactor all these tor_inet_ntoa idioms
but don't refactor the ones that look messy
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/or/router.c b/src/or/router.c index 8b3a1849a..3fc16907b 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -1257,8 +1257,6 @@ static int router_guess_address_from_dir_headers(uint32_t *guess); int router_pick_published_address(or_options_t *options, uint32_t *addr) { - char buf[INET_NTOA_BUF_LEN]; - struct in_addr a; if (resolve_my_address(LOG_INFO, options, addr, NULL) < 0) { log_info(LD_CONFIG, "Could not determine our address locally. " "Checking if directory headers provide any hints."); @@ -1268,9 +1266,7 @@ router_pick_published_address(or_options_t *options, uint32_t *addr) return -1; } } - a.s_addr = htonl(*addr); - tor_inet_ntoa(&a, buf, sizeof(buf)); - log_info(LD_CONFIG,"Success: chose address '%s'.", buf); + log_info(LD_CONFIG,"Success: chose address '%s'.", fmt_addr32(*addr)); return 0; } |