summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2011-10-05 20:34:23 +0000
committerVincent Torri <vincent.torri@gmail.com>2011-10-05 20:34:23 +0000
commite74bd3d04b31365121ed7bdbdd0f5243ce0d8835 (patch)
tree4e536def4523f7210102fa7efd28f0bf6c76496d /legacy
parent2c6a86fb6d39b46d10cd61f5baa7e409b3cecd8e (diff)
oups, too fast.
SVN revision: 63844
Diffstat (limited to 'legacy')
-rw-r--r--legacy/evil/src/lib/evil_inet.c13
-rw-r--r--legacy/evil/src/lib/evil_inet.h4
2 files changed, 3 insertions, 14 deletions
diff --git a/legacy/evil/src/lib/evil_inet.c b/legacy/evil/src/lib/evil_inet.c
index 46a0f6afb3..d4eacee617 100644
--- a/legacy/evil/src/lib/evil_inet.c
+++ b/legacy/evil/src/lib/evil_inet.c
@@ -624,20 +624,9 @@ ares_inet_ntop(int af, const void *src, char *dst, size_t size)
624 /* NOTREACHED */ 624 /* NOTREACHED */
625} 625}
626 626
627const char *evil_inet_ntop(int af, const char *src, void *dst) 627const char *evil_inet_ntop(int af, const char *src, void *dst, size_t size)
628{ 628{
629 const char *result; 629 const char *result;
630 size_t size;
631
632 if (af == AF_INET)
633 size = sizeof(struct in_addr);
634 else if (af == AF_INET6)
635 size = sizeof(struct ares_in6_addr);
636 else
637 {
638 SET_ERRNO(EAFNOSUPPORT);
639 return NULL;
640 }
641 result = ares_inet_ntop(af, src, dst, size); 630 result = ares_inet_ntop(af, src, dst, size);
642 if ((result == NULL) && (ERRNO == ENOSPC)) 631 if ((result == NULL) && (ERRNO == ENOSPC))
643 return NULL; 632 return NULL;
diff --git a/legacy/evil/src/lib/evil_inet.h b/legacy/evil/src/lib/evil_inet.h
index 46e0c8be90..e80a884c11 100644
--- a/legacy/evil/src/lib/evil_inet.h
+++ b/legacy/evil/src/lib/evil_inet.h
@@ -32,9 +32,9 @@ EAPI int evil_inet_pton(int af, const char *src, void *dst);
32 32
33#define inet_pton(x,y,z) evil_inet_pton(x,y,z) 33#define inet_pton(x,y,z) evil_inet_pton(x,y,z)
34 34
35EAPI const char *evil_inet_ntop(int af, const char *src, void *dst); 35EAPI const char *evil_inet_ntop(int af, const char *src, void *dst, size_t size);
36 36
37#define inet_ntop(x,y,z) evil_inet_ntop(x,y,z) 37#define inet_ntop(x,y,z,s) evil_inet_ntop(x,y,z,s)
38 38
39 39
40 40