summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/inet_ntop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/net/inet_ntop.c')
-rw-r--r--src/lib/libc/net/inet_ntop.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libc/net/inet_ntop.c b/src/lib/libc/net/inet_ntop.c
index d36a0d7889..9deb352e24 100644
--- a/src/lib/libc/net/inet_ntop.c
+++ b/src/lib/libc/net/inet_ntop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: inet_ntop.c,v 1.7 2005/08/06 20:30:03 espie Exp $ */ 1/* $OpenBSD: inet_ntop.c,v 1.8 2008/12/09 19:38:38 otto Exp $ */
2 2
3/* Copyright (c) 1996 by Internet Software Consortium. 3/* Copyright (c) 1996 by Internet Software Consortium.
4 * 4 *
@@ -43,13 +43,13 @@ static const char *inet_ntop6(const u_char *src, char *dst, size_t size);
43 * Paul Vixie, 1996. 43 * Paul Vixie, 1996.
44 */ 44 */
45const char * 45const char *
46inet_ntop(int af, const void *src, char *dst, size_t size) 46inet_ntop(int af, const void *src, char *dst, socklen_t size)
47{ 47{
48 switch (af) { 48 switch (af) {
49 case AF_INET: 49 case AF_INET:
50 return (inet_ntop4(src, dst, size)); 50 return (inet_ntop4(src, dst, (size_t)size));
51 case AF_INET6: 51 case AF_INET6:
52 return (inet_ntop6(src, dst, size)); 52 return (inet_ntop6(src, dst, (size_t)size));
53 default: 53 default:
54 errno = EAFNOSUPPORT; 54 errno = EAFNOSUPPORT;
55 return (NULL); 55 return (NULL);