summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/inet_ntop.c
diff options
context:
space:
mode:
authorguenther <>2016-09-21 04:38:56 +0000
committerguenther <>2016-09-21 04:38:56 +0000
commit9c39f482053578cd14ef5b179253da998be17454 (patch)
tree3bb42615ccded37cb263d99efa2577aacafc250f /src/lib/libc/net/inet_ntop.c
parent6d139a2f685581fa5f221bba4bc860f16b4af925 (diff)
downloadopenbsd-9c39f482053578cd14ef5b179253da998be17454.tar.gz
openbsd-9c39f482053578cd14ef5b179253da998be17454.tar.bz2
openbsd-9c39f482053578cd14ef5b179253da998be17454.zip
Delete casts to off_t and size_t that are implied by assignments
or prototypes. Ditto for some of the char* and void* casts too. verified no change to instructions on ILP32 (i386) and LP64 (amd64) ok natano@ abluhm@ deraadt@ millert@
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 f44dd08022..2bb11c2ab2 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.12 2015/09/13 21:36:08 guenther Exp $ */ 1/* $OpenBSD: inet_ntop.c,v 1.13 2016/09/21 04:38:56 guenther Exp $ */
2 2
3/* Copyright (c) 1996 by Internet Software Consortium. 3/* Copyright (c) 1996 by Internet Software Consortium.
4 * 4 *
@@ -46,9 +46,9 @@ inet_ntop(int af, const void *src, char *dst, socklen_t size)
46{ 46{
47 switch (af) { 47 switch (af) {
48 case AF_INET: 48 case AF_INET:
49 return (inet_ntop4(src, dst, (size_t)size)); 49 return (inet_ntop4(src, dst, size));
50 case AF_INET6: 50 case AF_INET6:
51 return (inet_ntop6(src, dst, (size_t)size)); 51 return (inet_ntop6(src, dst, size));
52 default: 52 default:
53 errno = EAFNOSUPPORT; 53 errno = EAFNOSUPPORT;
54 return (NULL); 54 return (NULL);
@@ -167,7 +167,7 @@ inet_ntop6(const u_char *src, char *dst, size_t size)
167 /* Is this address an encapsulated IPv4? */ 167 /* Is this address an encapsulated IPv4? */
168 if (i == 6 && best.base == 0 && 168 if (i == 6 && best.base == 0 &&
169 (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) { 169 (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
170 if (!inet_ntop4(src+12, tp, (size_t)(ep - tp))) 170 if (!inet_ntop4(src+12, tp, ep - tp))
171 return (NULL); 171 return (NULL);
172 tp += strlen(tp); 172 tp += strlen(tp);
173 break; 173 break;