git: 1ea42a28806e - main - md5: Use c89 function definitions
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 27 Nov 2022 20:35:32 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1ea42a28806e420b012d857a666e390d55d75630 commit 1ea42a28806e420b012d857a666e390d55d75630 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2022-11-27 20:22:31 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2022-11-27 20:22:31 +0000 md5: Use c89 function definitions Use the c89 function definitions rather than the old K&R definitions. Sponsored by: Netflix --- sys/kern/md5c.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/kern/md5c.c b/sys/kern/md5c.c index 175bd38aeee1..c23e874b14a1 100644 --- a/sys/kern/md5c.c +++ b/sys/kern/md5c.c @@ -131,8 +131,7 @@ static unsigned char PADDING[64] = { /* MD5 initialization. Begins an MD5 operation, writing a new context. */ void -MD5Init (context) - MD5_CTX *context; +MD5Init(MD5_CTX *context) { context->count[0] = context->count[1] = 0; @@ -151,10 +150,7 @@ MD5Init (context) */ void -MD5Update (context, in, inputLen) - MD5_CTX *context; - const void *in; - unsigned int inputLen; +MD5Update(MD5_CTX *context, const void *in, unsigned int inputLen) { unsigned int i, index, partLen; const unsigned char *input = in; @@ -194,7 +190,7 @@ MD5Update (context, in, inputLen) */ static void -MD5Pad (MD5_CTX *context) +MD5Pad(MD5_CTX *context) { unsigned char bits[8]; unsigned int index, padLen; @@ -232,9 +228,7 @@ MD5Final(unsigned char digest[static MD5_DIGEST_LENGTH], MD5_CTX *context) /* MD5 basic transformation. Transforms state based on block. */ static void -MD5Transform (state, block) - uint32_t state[4]; - const unsigned char block[64]; +MD5Transform(uint32_t state[4], const unsigned char block[64]) { uint32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16];