Mon Mar 16 05:59:22 2009 UTC ()
ansify function definitions


(cegger)
diff -r1.2 -r1.3 src/common/lib/libc/gen/bswap64.c
diff -r1.3 -r1.4 src/common/lib/libc/hash/sha1/sha1.c
diff -r1.3 -r1.4 src/common/lib/libc/md/md4c.c
diff -r1.3 -r1.4 src/common/lib/libc/md/md5c.c
diff -r1.2 -r1.3 src/common/lib/libc/net/__cmsg_alignbytes.c

cvs diff -r1.2 -r1.3 src/common/lib/libc/gen/bswap64.c (expand / switch to context diff)
--- src/common/lib/libc/gen/bswap64.c 2008/02/16 17:37:13 1.2
+++ src/common/lib/libc/gen/bswap64.c 2009/03/16 05:59:21 1.3
@@ -1,4 +1,4 @@
-/*  $NetBSD: bswap64.c,v 1.2 2008/02/16 17:37:13 apb Exp $    */
+/*  $NetBSD: bswap64.c,v 1.3 2009/03/16 05:59:21 cegger Exp $    */
 
 /*
  * Written by Manuel Bouyer <bouyer@NetBSD.org>.
@@ -7,7 +7,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: bswap64.c,v 1.2 2008/02/16 17:37:13 apb Exp $");
+__RCSID("$NetBSD: bswap64.c,v 1.3 2009/03/16 05:59:21 cegger Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
@@ -16,8 +16,7 @@
 #undef bswap64
 
 uint64_t
-bswap64(x)
-	uint64_t x;
+bswap64(uint64_t x)
 {
 #ifdef _LP64
 	/*

cvs diff -r1.3 -r1.4 src/common/lib/libc/hash/sha1/sha1.c (expand / switch to context diff)
--- src/common/lib/libc/hash/sha1/sha1.c 2008/02/16 17:37:13 1.3
+++ src/common/lib/libc/hash/sha1/sha1.c 2009/03/16 05:59:21 1.4
@@ -1,4 +1,4 @@
-/*	$NetBSD: sha1.c,v 1.3 2008/02/16 17:37:13 apb Exp $	*/
+/*	$NetBSD: sha1.c,v 1.4 2009/03/16 05:59:21 cegger Exp $	*/
 /*	$OpenBSD: sha1.c,v 1.9 1997/07/23 21:12:32 kstailey Exp $	*/
 
 /*
@@ -20,14 +20,14 @@
 #include <sys/cdefs.h>
 
 #if defined(_KERNEL) || defined(_STANDALONE)
-__KERNEL_RCSID(0, "$NetBSD: sha1.c,v 1.3 2008/02/16 17:37:13 apb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sha1.c,v 1.4 2009/03/16 05:59:21 cegger Exp $");
 
 #include <lib/libkern/libkern.h>
 
 #else
 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: sha1.c,v 1.3 2008/02/16 17:37:13 apb Exp $");
+__RCSID("$NetBSD: sha1.c,v 1.4 2009/03/16 05:59:21 cegger Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -145,9 +145,7 @@
 /*
  * Hash a single 512-bit block. This is the core of the algorithm.
  */
-void SHA1Transform(state, buffer)
-    uint32_t state[5];
-    const u_char buffer[64];
+void SHA1Transform(uint32_t state[5], const u_char buffer[64])
 {
     uint32_t a, b, c, d, e;
     CHAR64LONG16 *block;
@@ -217,8 +215,7 @@
 /*
  * SHA1Init - Initialize new context
  */
-void SHA1Init(context)
-    SHA1_CTX *context;
+void SHA1Init(SHA1_CTX *context)
 {
 
     _DIAGASSERT(context != 0);
@@ -236,10 +233,7 @@
 /*
  * Run your data through this.
  */
-void SHA1Update(context, data, len)
-    SHA1_CTX *context;
-    const u_char *data;
-    u_int len;
+void SHA1Update(SHA1_CTX *context, const u_char *data, u_int len)
 {
     u_int i, j;
 
@@ -266,9 +260,7 @@
 /*
  * Add padding and return the message digest.
  */
-void SHA1Final(digest, context)
-    u_char digest[20];
-    SHA1_CTX* context;
+void SHA1Final(u_char digest[20], SHA1_CTX *context)
 {
     u_int i;
     u_char finalcount[8];

cvs diff -r1.3 -r1.4 src/common/lib/libc/md/md4c.c (expand / switch to context diff)
--- src/common/lib/libc/md/md4c.c 2008/02/16 17:37:13 1.3
+++ src/common/lib/libc/md/md4c.c 2009/03/16 05:59:21 1.4
@@ -1,4 +1,4 @@
-/*	$NetBSD: md4c.c,v 1.3 2008/02/16 17:37:13 apb Exp $	*/
+/*	$NetBSD: md4c.c,v 1.4 2009/03/16 05:59:21 cegger Exp $	*/
 
 /*
  * This file is derived from the RSA Data Security, Inc. MD4 Message-Digest
@@ -31,7 +31,7 @@
 #if !defined(_KERNEL) && !defined(_STANDALONE)
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: md4c.c,v 1.3 2008/02/16 17:37:13 apb Exp $");
+__RCSID("$NetBSD: md4c.c,v 1.4 2009/03/16 05:59:21 cegger Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -129,8 +129,7 @@
  * MD4 initialization. Begins an MD4 operation, writing a new context.
  */
 void
-MD4Init(context)
-	MD4_CTX *context;		/* context */
+MD4Init(MD4_CTX *context)		/* context */
 {
 
 	_DIAGASSERT(context != 0);
@@ -150,10 +149,9 @@
  * context.
  */
 void
-MD4Update (context, input, inputLen)
-	MD4_CTX *context;		/* context */
-	const unsigned char *input;	/* input block */
-	unsigned int inputLen;		/* length of input block */
+MD4Update (MD4_CTX *context,		/* context */
+	const unsigned char *input,	/* input block */
+	unsigned int inputLen)		/* length of input block */
 {
 	unsigned int i, idx, partLen;
 
@@ -192,9 +190,8 @@
  * message digest and zeroing the context.
  */
 void
-MD4Final (digest, context)
-	unsigned char digest[16];	/* message digest */
-	MD4_CTX *context;		/* context */
+MD4Final (unsigned char digest[16],	/* message digest */
+	MD4_CTX *context)		/* context */
 {
 	unsigned char bits[8];
 	unsigned int idx, padLen;
@@ -224,9 +221,7 @@
  * MD4 basic transformation.  Transforms state based on block.
  */
 static void
-MD4Transform (state, block)
-	UINT4 state[4];
-	const unsigned char block[64];
+MD4Transform (UINT4 state[4], const unsigned char block[64])
 {
 	UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
 
@@ -300,10 +295,7 @@
  * a multiple of 4.
  */
 static void
-Encode(output, input, len)
-	unsigned char *output;
-	UINT4 *input;
-	unsigned int len;
+Encode(unsigned char *output, UINT4 *input, unsigned int len)
 {
 	unsigned int i, j;
 
@@ -320,10 +312,7 @@
  * a multiple of 4.
  */
 static void
-Decode(output, input, len)
-	UINT4 *output;
-	const unsigned char *input;
-	unsigned int len;
+Decode(UINT4 *output, const unsigned char *input, unsigned int len)
 {
 	unsigned int i, j;
 

cvs diff -r1.3 -r1.4 src/common/lib/libc/md/md5c.c (expand / switch to context diff)
--- src/common/lib/libc/md/md5c.c 2008/02/16 17:37:13 1.3
+++ src/common/lib/libc/md/md5c.c 2009/03/16 05:59:21 1.4
@@ -1,4 +1,4 @@
-/*	$NetBSD: md5c.c,v 1.3 2008/02/16 17:37:13 apb Exp $	*/
+/*	$NetBSD: md5c.c,v 1.4 2009/03/16 05:59:21 cegger Exp $	*/
 
 /*
  * This file is derived from the RSA Data Security, Inc. MD5 Message-Digest
@@ -36,7 +36,7 @@
 #else
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: md5c.c,v 1.3 2008/02/16 17:37:13 apb Exp $");
+__RCSID("$NetBSD: md5c.c,v 1.4 2009/03/16 05:59:21 cegger Exp $");
 #endif /* LIBC_SCCS and not lint */
 #include "namespace.h"
 #include <sys/types.h>
@@ -94,10 +94,9 @@
  * a multiple of 4.
  */
 static void
-Encode (output, input, len)
-	unsigned char *output;
-	UINT4 *input;
-	unsigned int len;
+Encode (unsigned char *output,
+	UINT4 *input,
+	unsigned int len)
 {
 	unsigned int i, j;
 
@@ -114,10 +113,9 @@
  * a multiple of 4.
  */
 static void
-Decode (output, input, len)
-	UINT4 *output;
-	const unsigned char *input;
-	unsigned int len;
+Decode (UINT4 *output,
+	const unsigned char *input,
+	unsigned int len)
 {
 	unsigned int i, j;
 
@@ -177,8 +175,7 @@
  * MD5 initialization. Begins an MD5 operation, writing a new context.
  */
 void
-MD5Init(context)
-	MD5_CTX *context;		/* context */
+MD5Init(MD5_CTX *context)
 {
 
 	_DIAGASSERT(context != 0);
@@ -198,10 +195,9 @@
  * context.
  */
 void
-MD5Update(context, input, inputLen)
-	MD5_CTX *context;		/* context */
-	const unsigned char *input;	/* input block */
-	unsigned int inputLen;		/* length of input block */
+MD5Update(MD5_CTX *context,
+	const unsigned char *input,	/* input block */
+	unsigned int inputLen)		/* length of input block */
 {
 	unsigned int i, idx, partLen;
 
@@ -240,9 +236,8 @@
  * message digest and zeroing the context.
  */
 void
-MD5Final(digest, context)
-	unsigned char digest[16];	/* message digest */
-	MD5_CTX *context;		/* context */
+MD5Final(unsigned char digest[16],	/* message digest */
+	MD5_CTX *context)		/* context */
 {
 	unsigned char bits[8];
 	unsigned int idx, padLen;
@@ -272,9 +267,7 @@
  * MD5 basic transformation. Transforms state based on block.
  */
 static void
-MD5Transform(state, block)
-	UINT4 state[4];
-	const unsigned char block[64];
+MD5Transform(UINT4 state[4], const unsigned char block[64])
 {
 	UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
 

cvs diff -r1.2 -r1.3 src/common/lib/libc/net/Attic/__cmsg_alignbytes.c (expand / switch to context diff)
--- src/common/lib/libc/net/Attic/__cmsg_alignbytes.c 2008/04/28 20:22:53 1.2
+++ src/common/lib/libc/net/Attic/__cmsg_alignbytes.c 2009/03/16 05:59:21 1.3
@@ -1,4 +1,4 @@
-/*	$NetBSD: __cmsg_alignbytes.c,v 1.2 2008/04/28 20:22:53 martin Exp $	*/
+/*	$NetBSD: __cmsg_alignbytes.c,v 1.3 2009/03/16 05:59:21 cegger Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #if !defined(_KERNEL) && !defined(_STANDALONE)
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: __cmsg_alignbytes.c,v 1.2 2008/04/28 20:22:53 martin Exp $");
+__RCSID("$NetBSD: __cmsg_alignbytes.c,v 1.3 2009/03/16 05:59:21 cegger Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -47,7 +47,7 @@
 #endif
 
 int
-__cmsg_alignbytes()
+__cmsg_alignbytes(void)
 {
 	static int alignbytes = -1;
 #ifdef HW_ALIGNBYTES