summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/inet_pton.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/net/inet_pton.c')
-rw-r--r--src/lib/libc/net/inet_pton.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/lib/libc/net/inet_pton.c b/src/lib/libc/net/inet_pton.c
index b04ef05c31..ec158d4599 100644
--- a/src/lib/libc/net/inet_pton.c
+++ b/src/lib/libc/net/inet_pton.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: inet_pton.c,v 1.4 2002/02/16 21:27:23 millert Exp $ */ 1/* $OpenBSD: inet_pton.c,v 1.5 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
21static char rcsid[] = "$From: inet_pton.c,v 8.7 1996/08/05 08:31:35 vixie Exp $"; 21static char rcsid[] = "$From: inet_pton.c,v 8.7 1996/08/05 08:31:35 vixie Exp $";
22#else 22#else
23static char rcsid[] = "$OpenBSD: inet_pton.c,v 1.4 2002/02/16 21:27:23 millert Exp $"; 23static char rcsid[] = "$OpenBSD: inet_pton.c,v 1.5 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
@@ -53,10 +53,7 @@ static int inet_pton6(const char *src, u_char *dst);
53 * Paul Vixie, 1996. 53 * Paul Vixie, 1996.
54 */ 54 */
55int 55int
56inet_pton(af, src, dst) 56inet_pton(int af, const char *src, void *dst)
57 int af;
58 const char *src;
59 void *dst;
60{ 57{
61 switch (af) { 58 switch (af) {
62 case AF_INET: 59 case AF_INET:
@@ -81,9 +78,7 @@ inet_pton(af, src, dst)
81 * Paul Vixie, 1996. 78 * Paul Vixie, 1996.
82 */ 79 */
83static int 80static int
84inet_pton4(src, dst) 81inet_pton4(const char *src, u_char *dst)
85 const char *src;
86 u_char *dst;
87{ 82{
88 static const char digits[] = "0123456789"; 83 static const char digits[] = "0123456789";
89 int saw_digit, octets, ch; 84 int saw_digit, octets, ch;
@@ -135,9 +130,7 @@ inet_pton4(src, dst)
135 * Paul Vixie, 1996. 130 * Paul Vixie, 1996.
136 */ 131 */
137static int 132static int
138inet_pton6(src, dst) 133inet_pton6(const char *src, u_char *dst)
139 const char *src;
140 u_char *dst;
141{ 134{
142 static const char xdigits_l[] = "0123456789abcdef", 135 static const char xdigits_l[] = "0123456789abcdef",
143 xdigits_u[] = "0123456789ABCDEF"; 136 xdigits_u[] = "0123456789ABCDEF";