diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-02-22 08:18:36 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-02-22 08:18:36 +0000 |
commit | 6e6d95b3db091d4ae107c8d4f03354ccadd20757 (patch) | |
tree | 1c5799dcfb490b15934adffa42a564d9a47f8a91 /src/or/test.c | |
parent | e8da6b26b62475114937077e88905be921937554 (diff) | |
download | tor-6e6d95b3db091d4ae107c8d4f03354ccadd20757.tar.gz tor-6e6d95b3db091d4ae107c8d4f03354ccadd20757.zip |
Change from inet_ntoa to a threadproof tor_inet_ntoa.
svn:r3656
Diffstat (limited to 'src/or/test.c')
-rw-r--r-- | src/or/test.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/test.c b/src/or/test.c index cf3505c0a8..a30d43e969 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -791,6 +791,14 @@ test_util(void) { test_assert(strcmpend("abcdef", "dee")>0); test_assert(strcmpend("ab", "abb")<0); + { + char tmpbuf[INET_NTOA_BUF_LEN]; + struct in_addr in; + tor_inet_aton("18.244.0.188",&in); + tor_inet_ntoa(&in, tmpbuf, sizeof(tmpbuf)); + test_streq(tmpbuf, "18.244.0.188"); + } + /* XXXX test older functions. */ smartlist_free(sl); } |