diff options
Diffstat (limited to 'src/lib/libc/net/inet_ntop.c')
| -rw-r--r-- | src/lib/libc/net/inet_ntop.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/lib/libc/net/inet_ntop.c b/src/lib/libc/net/inet_ntop.c index adce61c1d4..ec5c12983a 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.5 2002/08/23 16:27:31 itojun Exp $ */ | 1 | /* $OpenBSD: inet_ntop.c,v 1.6 2005/03/25 13:24:12 otto Exp $ */ |
| 2 | 2 | ||
| 3 | /* Copyright (c) 1996 by Internet Software Consortium. | 3 | /* Copyright (c) 1996 by Internet Software Consortium. |
| 4 | * | 4 | * |
| @@ -20,7 +20,7 @@ | |||
| 20 | #if 0 | 20 | #if 0 |
| 21 | static char rcsid[] = "$From: inet_ntop.c,v 8.7 1996/08/05 08:41:18 vixie Exp $"; | 21 | static char rcsid[] = "$From: inet_ntop.c,v 8.7 1996/08/05 08:41:18 vixie Exp $"; |
| 22 | #else | 22 | #else |
| 23 | static char rcsid[] = "$OpenBSD: inet_ntop.c,v 1.5 2002/08/23 16:27:31 itojun Exp $"; | 23 | static char rcsid[] = "$OpenBSD: inet_ntop.c,v 1.6 2005/03/25 13:24:12 otto Exp $"; |
| 24 | #endif | 24 | #endif |
| 25 | #endif /* LIBC_SCCS and not lint */ | 25 | #endif /* LIBC_SCCS and not lint */ |
| 26 | 26 | ||
| @@ -51,11 +51,7 @@ static const char *inet_ntop6(const u_char *src, char *dst, size_t size); | |||
| 51 | * Paul Vixie, 1996. | 51 | * Paul Vixie, 1996. |
| 52 | */ | 52 | */ |
| 53 | const char * | 53 | const char * |
| 54 | inet_ntop(af, src, dst, size) | 54 | inet_ntop(int af, const void *src, char *dst, size_t size) |
| 55 | int af; | ||
| 56 | const void *src; | ||
| 57 | char *dst; | ||
| 58 | size_t size; | ||
| 59 | { | 55 | { |
| 60 | switch (af) { | 56 | switch (af) { |
| 61 | case AF_INET: | 57 | case AF_INET: |
| @@ -81,10 +77,7 @@ inet_ntop(af, src, dst, size) | |||
| 81 | * Paul Vixie, 1996. | 77 | * Paul Vixie, 1996. |
| 82 | */ | 78 | */ |
| 83 | static const char * | 79 | static const char * |
| 84 | inet_ntop4(src, dst, size) | 80 | inet_ntop4(const u_char *src, char *dst, size_t size) |
| 85 | const u_char *src; | ||
| 86 | char *dst; | ||
| 87 | size_t size; | ||
| 88 | { | 81 | { |
| 89 | static const char fmt[] = "%u.%u.%u.%u"; | 82 | static const char fmt[] = "%u.%u.%u.%u"; |
| 90 | char tmp[sizeof "255.255.255.255"]; | 83 | char tmp[sizeof "255.255.255.255"]; |
| @@ -106,10 +99,7 @@ inet_ntop4(src, dst, size) | |||
| 106 | * Paul Vixie, 1996. | 99 | * Paul Vixie, 1996. |
| 107 | */ | 100 | */ |
| 108 | static const char * | 101 | static const char * |
| 109 | inet_ntop6(src, dst, size) | 102 | inet_ntop6(const u_char *src, char *dst, size_t size) |
| 110 | const u_char *src; | ||
| 111 | char *dst; | ||
| 112 | size_t size; | ||
| 113 | { | 103 | { |
| 114 | /* | 104 | /* |
| 115 | * Note that int32_t and int16_t need only be "at least" large enough | 105 | * Note that int32_t and int16_t need only be "at least" large enough |
