oups, too fast.

SVN revision: 63844
This commit is contained in:
Vincent Torri 2011-10-05 20:34:23 +00:00
parent 2c6a86fb6d
commit e74bd3d04b
2 changed files with 3 additions and 14 deletions

View File

@ -624,20 +624,9 @@ ares_inet_ntop(int af, const void *src, char *dst, size_t size)
/* NOTREACHED */
}
const char *evil_inet_ntop(int af, const char *src, void *dst)
const char *evil_inet_ntop(int af, const char *src, void *dst, size_t size)
{
const char *result;
size_t size;
if (af == AF_INET)
size = sizeof(struct in_addr);
else if (af == AF_INET6)
size = sizeof(struct ares_in6_addr);
else
{
SET_ERRNO(EAFNOSUPPORT);
return NULL;
}
result = ares_inet_ntop(af, src, dst, size);
if ((result == NULL) && (ERRNO == ENOSPC))
return NULL;

View File

@ -32,9 +32,9 @@ EAPI int evil_inet_pton(int af, const char *src, void *dst);
#define inet_pton(x,y,z) evil_inet_pton(x,y,z)
EAPI const char *evil_inet_ntop(int af, const char *src, void *dst);
EAPI const char *evil_inet_ntop(int af, const char *src, void *dst, size_t size);
#define inet_ntop(x,y,z) evil_inet_ntop(x,y,z)
#define inet_ntop(x,y,z,s) evil_inet_ntop(x,y,z,s)