From 1661bc468452a1ea50dfc98e76704d8c3c35a6c7 Mon Sep 17 00:00:00 2001
From: Cyril Brulebois <kibi@debian.org>
Date: Wed, 15 Aug 2012 13:09:56 +0200
Subject: [PATCH 3/6] [md5] Fix non-ANSI function definitions.

The following was used in the past:
  int foo(bar, baz)
    int bar;
    int baz;
  { ... }

But that's written this way now:
  int foo(int bar, int baz)
  { ... }

Signed-off-by: Cyril Brulebois <kibi@debian.org>
---
 src/md5.c    |   36 ++++++++----------------------------
 src/plugin.h |    2 +-
 2 files changed, 9 insertions(+), 29 deletions(-)

diff --git a/src/md5.c b/src/md5.c
index f13d866..16a8c27 100644
--- a/src/md5.c
+++ b/src/md5.c
@@ -110,8 +110,7 @@ Rotation is separate from addition to prevent recomputation.
 
 /* MD5 initialization. Begins an MD5 operation, writing a new context.
  */
-void li_MD5_Init (context)
-li_MD5_CTX *context;                                        /* context */
+void li_MD5_Init (li_MD5_CTX *context)
 {
   context->count[0] = context->count[1] = 0;
   /* Load magic initialization constants.
@@ -126,10 +125,7 @@ li_MD5_CTX *context;                                        /* context */
   operation, processing another message block, and updating the
   context.
  */
-void li_MD5_Update (context, _input, inputLen)
-li_MD5_CTX *context;                                        /* context */
-const void *_input;                                /* input block */
-unsigned int inputLen;                     /* length of input block */
+void li_MD5_Update (li_MD5_CTX *context, const void *_input, unsigned int inputLen)
 {
   unsigned int i, ndx, partLen;
   const unsigned char *input = (const unsigned char*) _input;
@@ -170,9 +166,7 @@ unsigned int inputLen;                     /* length of input block */
 /* MD5 finalization. Ends an MD5 message-digest operation, writing the
   the message digest and zeroizing the context.
  */
-void li_MD5_Final (digest, context)
-unsigned char digest[16];                         /* message digest */
-li_MD5_CTX *context;                                       /* context */
+void li_MD5_Final (unsigned char digest[16], li_MD5_CTX *context)
 {
   unsigned char bits[8];
   unsigned int ndx, padLen;
@@ -199,9 +193,7 @@ li_MD5_CTX *context;                                       /* context */
 
 /* MD5 basic transformation. Transforms state based on block.
  */
-static void li_MD5Transform (state, block)
-UINT4 state[4];
-const unsigned char block[64];
+static void li_MD5Transform (UINT4 state[4], const unsigned char block[64])
 {
   UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
 
@@ -294,10 +286,7 @@ const unsigned char block[64];
 /* Encodes input (UINT4) into output (unsigned char). Assumes len is
   a multiple of 4.
  */
-static void Encode (output, input, len)
-unsigned char *output;
-UINT4 *input;
-unsigned int len;
+static void Encode (unsigned char *output, UINT4 *input, unsigned int len)
 {
   unsigned int i, j;
 
@@ -312,10 +301,7 @@ unsigned int len;
 /* Decodes input (unsigned char) into output (UINT4). Assumes len is
   a multiple of 4.
  */
-static void Decode (output, input, len)
-UINT4 *output;
-const unsigned char *input;
-unsigned int len;
+static void Decode (UINT4 *output, const unsigned char *input, unsigned int len)
 {
   unsigned int i, j;
 
@@ -327,10 +313,7 @@ unsigned int len;
 /* Note: Replace "for loop" with standard memcpy if possible.
  */
 #ifndef HAVE_MEMCPY
-static void MD5_memcpy (output, input, len)
-POINTER output;
-POINTER input;
-unsigned int len;
+static void MD5_memcpy (POINTER output, POINTER input, unsigned int len)
 {
   unsigned int i;
 
@@ -342,10 +325,7 @@ unsigned int len;
 /* Note: Replace "for loop" with standard memset if possible.
  */
 #ifndef HAVE_MEMSET
-static void MD5_memset (output, value, len)
-POINTER output;
-int value;
-unsigned int len;
+static void MD5_memset (POINTER output, int value, unsigned int len)
 {
   unsigned int i;
 
diff --git a/src/plugin.h b/src/plugin.h
index aa64bee..cadce54 100644
--- a/src/plugin.h
+++ b/src/plugin.h
@@ -11,7 +11,7 @@
 		static handler_t x(server *srv, connection *con, void *p_d)
 
 #define INIT_FUNC(x) \
-		static void *x()
+		static void *x(void)
 
 #define FREE_FUNC          SERVER_FUNC
 #define TRIGGER_FUNC       SERVER_FUNC
-- 
1.7.10.4

