diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-02-09 03:13:05 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-02-09 03:13:05 +0000 |
commit | fe987d3a1796c91bc6482874896c5912099d6d73 (patch) | |
tree | d0b96e229243e3ec287cb0fed0c4893dce49f68f /src/or/eventdns.c | |
parent | 2ebdf91a523348aad3eae7dc565510260a374ef4 (diff) | |
download | tor-fe987d3a1796c91bc6482874896c5912099d6d73.tar.gz tor-fe987d3a1796c91bc6482874896c5912099d6d73.zip |
Remove some deadcode and use tor_inet_aton uniformly.
svn:r18422
Diffstat (limited to 'src/or/eventdns.c')
-rw-r--r-- | src/or/eventdns.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/or/eventdns.c b/src/or/eventdns.c index 9ce4c392f7..6d19c01a29 100644 --- a/src/or/eventdns.c +++ b/src/or/eventdns.c @@ -355,20 +355,7 @@ error_is_eagain(int err) { return err == EAGAIN || err == WSAEWOULDBLOCK; } -static int -inet_aton(const char *c, struct in_addr *addr) -{ - uint32_t r; - if (strcmp(c, "255.255.255.255") == 0) { - addr->s_addr = 0xffffffffu; - } else { - r = inet_addr(c); - if (r == INADDR_NONE) - return 0; - addr->s_addr = r; - } - return 1; -} +#define inet_aton(c, addr) tor_inet_aton((c), (addr)) #define CLOSE_SOCKET(x) closesocket(x) #else #define last_error(sock) (errno) |