From 6e6d95b3db091d4ae107c8d4f03354ccadd20757 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 22 Feb 2005 08:18:36 +0000 Subject: Change from inet_ntoa to a threadproof tor_inet_ntoa. svn:r3656 --- src/tools/tor-resolve.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/tools/tor-resolve.c') 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; } -- cgit v1.2.3-54-g00ecf