[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Change from inet_ntoa to a threadproof tor_inet_ntoa.
Update of /home/or/cvsroot/tor/src/tools
In directory moria.mit.edu:/tmp/cvs-serv20997/src/tools
Modified Files:
tor-resolve.c
Log Message:
Change from inet_ntoa to a threadproof tor_inet_ntoa.
Index: tor-resolve.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/tools/tor-resolve.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- tor-resolve.c 16 Jan 2005 02:21:14 -0000 1.14
+++ tor-resolve.c 22 Feb 2005 08:18:36 -0000 1.15
@@ -174,6 +174,7 @@
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 @@
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;
}