summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCyril Brulebois <kibi@debian.org>2012-08-31 14:11:42 +0000
committerStefan Bühler <stbuehler@web.de>2012-08-31 14:11:42 +0000
commitb6b6eda29222ce02da3e1016e4e9907bd663c5d1 (patch)
tree1fd8e284ae3f8631f8a703d16471dbebc8042c97 /src
parent0c6a56454362cd35aba697c1fdfae432c612a851 (diff)
downloadlighttpd-git-b6b6eda29222ce02da3e1016e4e9907bd663c5d1.tar.gz
[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> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2844 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src')
-rw-r--r--src/md5.c36
1 files changed, 8 insertions, 28 deletions
diff --git a/src/md5.c b/src/md5.c
index f13d866a..16a8c272 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;