aboutsummaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-02-22 08:18:36 +0000
committerNick Mathewson <nickm@torproject.org>2005-02-22 08:18:36 +0000
commit6e6d95b3db091d4ae107c8d4f03354ccadd20757 (patch)
tree1c5799dcfb490b15934adffa42a564d9a47f8a91 /src/tools
parente8da6b26b62475114937077e88905be921937554 (diff)
downloadtor-6e6d95b3db091d4ae107c8d4f03354ccadd20757.tar.gz
tor-6e6d95b3db091d4ae107c8d4f03354ccadd20757.zip
Change from inet_ntoa to a threadproof tor_inet_ntoa.
svn:r3656
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/tor-resolve.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tools/tor-resolve.c b/src/tools/tor-resolve.c
index 65a6300cfa..090503045e 100644
--- a/src/tools/tor-resolve.c
+++ b/src/tools/tor-resolve.c
@@ -174,6 +174,7 @@ main(int argc, char **argv)
int n_args;
struct in_addr a;
uint32_t result;
+ char buf[INET_NTOA_BUF_LEN];
arg = &argv[1];
n_args = argc-1;
@@ -225,6 +226,7 @@ main(int argc, char **argv)
return 1;
a.s_addr = htonl(result);
- printf("%s\n", inet_ntoa(a));
+ tor_inet_ntoa(&a, buf, sizeof(buf));
+ printf("%s\n", buf);
return 0;
}