summaryrefslogtreecommitdiff
path: root/legacy/evil/src/lib/evil_inet.c
diff options
context:
space:
mode:
Diffstat (limited to 'legacy/evil/src/lib/evil_inet.c')
-rw-r--r--legacy/evil/src/lib/evil_inet.c13
1 files changed, 1 insertions, 12 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;