md5: Use c89 function definitions

Use the c89 function definitions rather than the old K&R definitions.

Sponsored by:		Netflix
This commit is contained in:
Warner Losh 2022-11-27 13:22:31 -07:00
parent 0af49f00b3
commit 1ea42a2880

View File

@ -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];