Module Name:    src
Committed By:   matt
Date:           Tue Mar 20 17:08:13 UTC 2012

Modified Files:
        src/lib/libc/inet: inet_cidr_pton.c inet_net_ntop.c inet_net_pton.c
            inet_ntop.c

Log Message:
Use C89 definitions


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/inet/inet_cidr_pton.c
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/inet/inet_net_ntop.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/inet/inet_net_pton.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/inet/inet_ntop.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/inet/inet_cidr_pton.c
diff -u src/lib/libc/inet/inet_cidr_pton.c:1.7 src/lib/libc/inet/inet_cidr_pton.c:1.8
--- src/lib/libc/inet/inet_cidr_pton.c:1.7	Tue Mar 13 21:13:38 2012
+++ src/lib/libc/inet/inet_cidr_pton.c	Tue Mar 20 17:08:13 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: inet_cidr_pton.c,v 1.7 2012/03/13 21:13:38 christos Exp $	*/
+/*	$NetBSD: inet_cidr_pton.c,v 1.8 2012/03/20 17:08:13 matt Exp $	*/
 
 /*
  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@@ -22,7 +22,7 @@
 #if 0
 static const char rcsid[] = "Id: inet_cidr_pton.c,v 1.6 2005/04/27 04:56:19 sra Exp";
 #else
-__RCSID("$NetBSD: inet_cidr_pton.c,v 1.7 2012/03/13 21:13:38 christos Exp $");
+__RCSID("$NetBSD: inet_cidr_pton.c,v 1.8 2012/03/20 17:08:13 matt Exp $");
 #endif
 #endif
 
@@ -55,10 +55,9 @@ __RCSID("$NetBSD: inet_cidr_pton.c,v 1.7
 __weak_alias(inet_cidr_pton,_inet_cidr_pton)
 #endif
 
-static int	inet_cidr_pton_ipv4 __P((const char *src, u_char *dst,
-					 int *bits, int ipv6));
-static int	inet_cidr_pton_ipv6 __P((const char *src, u_char *dst,
-					 int *bits));
+static int	inet_cidr_pton_ipv4(const char *src, u_char *dst,
+					 int *bits, int ipv6);
+static int	inet_cidr_pton_ipv6(const char *src, u_char *dst, int *bits);
 
 static int	getbits(const char *, int ipv6);
 

Index: src/lib/libc/inet/inet_net_ntop.c
diff -u src/lib/libc/inet/inet_net_ntop.c:1.2 src/lib/libc/inet/inet_net_ntop.c:1.3
--- src/lib/libc/inet/inet_net_ntop.c:1.2	Sat Feb  7 07:25:22 2009
+++ src/lib/libc/inet/inet_net_ntop.c	Tue Mar 20 17:08:13 2012
@@ -20,7 +20,7 @@
 #ifdef notdef
 static const char rcsid[] = "Id: inet_net_ntop.c,v 1.1.2.1 2002/08/02 02:17:21 marka Exp ";
 #else
-__RCSID("$NetBSD: inet_net_ntop.c,v 1.2 2009/02/07 07:25:22 lukem Exp $");
+__RCSID("$NetBSD: inet_net_ntop.c,v 1.3 2012/03/20 17:08:13 matt Exp $");
 #endif
 #endif
 
@@ -49,10 +49,10 @@ __weak_alias(inet_net_ntop,_inet_net_nto
 # define SPRINTF(x) sprintf x
 #endif
 
-static char *	inet_net_ntop_ipv4 __P((const u_char *src, int bits,
-					char *dst, size_t size));
-static char *	inet_net_ntop_ipv6 __P((const u_char *src, int bits,
-					char *dst, size_t size));
+static char *	inet_net_ntop_ipv4(const u_char *src, int bits,
+					char *dst, size_t size);
+static char *	inet_net_ntop_ipv6(const u_char *src, int bits,
+					char *dst, size_t size);
 
 /*
  * char *
@@ -65,12 +65,7 @@ static char *	inet_net_ntop_ipv6 __P((co
  *	Paul Vixie (ISC), July 1996
  */
 char *
-inet_net_ntop(af, src, bits, dst, size)
-	int af;
-	const void *src;
-	int bits;
-	char *dst;
-	size_t size;
+inet_net_ntop(int af, const void *src, int bits, char *dst, size_t size)
 {
 	switch (af) {
 	case AF_INET:
@@ -97,11 +92,7 @@ inet_net_ntop(af, src, bits, dst, size)
  *	Paul Vixie (ISC), July 1996
  */
 static char *
-inet_net_ntop_ipv4(src, bits, dst, size)
-	const u_char *src;
-	int bits;
-	char *dst;
-	size_t size;
+inet_net_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size)
 {
 	char *odst = dst;
 	char *t;
@@ -176,7 +167,8 @@ inet_net_ntop_ipv4(src, bits, dst, size)
  */
 
 static char *
-inet_net_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size) {
+inet_net_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size)
+{
 	u_int	m;
 	int	b;
 	size_t	p;

Index: src/lib/libc/inet/inet_net_pton.c
diff -u src/lib/libc/inet/inet_net_pton.c:1.3 src/lib/libc/inet/inet_net_pton.c:1.4
--- src/lib/libc/inet/inet_net_pton.c:1.3	Tue Mar 13 21:13:38 2012
+++ src/lib/libc/inet/inet_net_pton.c	Tue Mar 20 17:08:13 2012
@@ -20,7 +20,7 @@
 #if 0
 static const char rcsid[] = "Id: inet_net_pton.c,v 1.4.2.1 2002/08/02 02:17:21 marka Exp ";
 #else
-__RCSID("$NetBSD: inet_net_pton.c,v 1.3 2012/03/13 21:13:38 christos Exp $");
+__RCSID("$NetBSD: inet_net_pton.c,v 1.4 2012/03/20 17:08:13 matt Exp $");
 #endif
 #endif
 
@@ -71,7 +71,8 @@ __weak_alias(inet_net_pton,_inet_net_pto
  *	Paul Vixie (ISC), June 1996
  */
 static int
-inet_net_pton_ipv4( const char *src, u_char *dst, size_t size) {
+inet_net_pton_ipv4(const char *src, u_char *dst, size_t size)
+{
 	static const char xdigits[] = "0123456789abcdef";
 	static const char digits[] = "0123456789";
 	int ch, dirty, bits;
@@ -197,7 +198,8 @@ inet_net_pton_ipv4( const char *src, u_c
 }
 
 static int
-getbits(const char *src, int *bitsp) {
+getbits(const char *src, int *bitsp)
+{
 	static const char digits[] = "0123456789";
 	int n;
 	int val;
@@ -227,7 +229,8 @@ getbits(const char *src, int *bitsp) {
 }
 
 static int
-getv4(const char *src, u_char *dst, int *bitsp) {
+getv4(const char *src, u_char *dst, int *bitsp)
+{
 	static const char digits[] = "0123456789";
 	u_char *odst = dst;
 	int n;
@@ -270,7 +273,8 @@ getv4(const char *src, u_char *dst, int 
 }
 
 static int
-inet_net_pton_ipv6(const char *src, u_char *dst, size_t size) {
+inet_net_pton_ipv6(const char *src, u_char *dst, size_t size)
+{
 	static const char xdigits_l[] = "0123456789abcdef",
 			  xdigits_u[] = "0123456789ABCDEF";
 	u_char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp;
@@ -402,7 +406,8 @@ inet_net_pton_ipv6(const char *src, u_ch
  *	Paul Vixie (ISC), June 1996
  */
 int
-inet_net_pton(int af, const char *src, void *dst, size_t size) {
+inet_net_pton(int af, const char *src, void *dst, size_t size)
+{
 	switch (af) {
 	case AF_INET:
 		return (inet_net_pton_ipv4(src, dst, size));

Index: src/lib/libc/inet/inet_ntop.c
diff -u src/lib/libc/inet/inet_ntop.c:1.8 src/lib/libc/inet/inet_ntop.c:1.9
--- src/lib/libc/inet/inet_ntop.c:1.8	Sun Apr 12 17:07:17 2009
+++ src/lib/libc/inet/inet_ntop.c	Tue Mar 20 17:08:13 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: inet_ntop.c,v 1.8 2009/04/12 17:07:17 christos Exp $	*/
+/*	$NetBSD: inet_ntop.c,v 1.9 2012/03/20 17:08:13 matt Exp $	*/
 
 /*
  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@@ -22,7 +22,7 @@
 #if 0
 static const char rcsid[] = "Id: inet_ntop.c,v 1.5 2005/11/03 22:59:52 marka Exp";
 #else
-__RCSID("$NetBSD: inet_ntop.c,v 1.8 2009/04/12 17:07:17 christos Exp $");
+__RCSID("$NetBSD: inet_ntop.c,v 1.9 2012/03/20 17:08:13 matt Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -66,11 +66,7 @@ static const char *inet_ntop6(const u_ch
  *	Paul Vixie, 1996.
  */
 const char *
-inet_ntop(af, src, dst, size)
-	int af;
-	const void *src;
-	char *dst;
-	socklen_t size;
+inet_ntop(int af, const void *src, char *dst, socklen_t size)
 {
 
 	_DIAGASSERT(src != NULL);
@@ -100,10 +96,7 @@ inet_ntop(af, src, dst, size)
  *	Paul Vixie, 1996.
  */
 static const char *
-inet_ntop4(src, dst, size)
-	const u_char *src;
-	char *dst;
-	socklen_t size;
+inet_ntop4(const u_char *src, char *dst, socklen_t size)
 {
 	char tmp[sizeof "255.255.255.255"];
 	int l;
@@ -128,10 +121,7 @@ inet_ntop4(src, dst, size)
  *	Paul Vixie, 1996.
  */
 static const char *
-inet_ntop6(src, dst, size)
-	const u_char *src;
-	char *dst;
-	socklen_t size;
+inet_ntop6(const u_char *src, char *dst, socklen_t size)
 {
 	/*
 	 * Note that int32_t and int16_t need only be "at least" large enough

Reply via email to