From owner-svn-src-head@freebsd.org Fri Apr 3 21:05:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 636A427146F; Fri, 3 Apr 2020 21:05:52 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48vCC30Dmwz40pM; Fri, 3 Apr 2020 21:05:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2756BB9FF; Fri, 3 Apr 2020 20:56:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 033Kuh2b055974; Fri, 3 Apr 2020 20:56:43 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 033Kuhma055973; Fri, 3 Apr 2020 20:56:43 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004032056.033Kuhma055973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 3 Apr 2020 20:56:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359615 - head/lib/libmd X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libmd X-SVN-Commit-Revision: 359615 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 21:05:52 -0000 Author: emaste Date: Fri Apr 3 20:56:43 2020 New Revision: 359615 URL: https://svnweb.freebsd.org/changeset/base/359615 Log: ANSIfy and KNF function arg definitions in libmd/md4.c Reported by: bde, in 2017 Modified: head/lib/libmd/md4c.c Modified: head/lib/libmd/md4c.c ============================================================================== --- head/lib/libmd/md4c.c Fri Apr 3 20:45:16 2020 (r359614) +++ head/lib/libmd/md4c.c Fri Apr 3 20:56:43 2020 (r359615) @@ -93,8 +93,8 @@ static unsigned char PADDING[64] = { /* MD4 initialization. Begins an MD4 operation, writing a new context. */ -void MD4Init (context) -MD4_CTX *context; /* context */ +void +MD4Init(MD4_CTX *context) { context->count[0] = context->count[1] = 0; @@ -110,10 +110,8 @@ MD4_CTX *context; operation, processing another message block, and updating the context. */ -void MD4Update (context, in, inputLen) -MD4_CTX *context; /* context */ -const void *in; /* input block */ -unsigned int inputLen; /* length of input block */ +void +MD4Update(MD4_CTX *context, const void *in, unsigned int inputLen) { unsigned int i, idx, partLen; const unsigned char *input = in; @@ -149,8 +147,8 @@ unsigned int inputLen; /* length o } /* MD4 padding. */ -void MD4Pad (context) -MD4_CTX *context; /* context */ +void +MD4Pad(MD4_CTX *context) { unsigned char bits[8]; unsigned int idx, padLen; @@ -171,9 +169,8 @@ MD4_CTX *context; /* MD4 finalization. Ends an MD4 message-digest operation, writing the the message digest and zeroizing the context. */ -void MD4Final (digest, context) -unsigned char digest[16]; /* message digest */ -MD4_CTX *context; /* context */ +void +MD4Final(unsigned char digest[16], MD4_CTX *context) { /* Do padding */ MD4Pad (context); @@ -188,9 +185,8 @@ MD4_CTX *context; /* MD4 basic transformation. Transforms state based on block. */ -static void MD4Transform (state, block) -UINT4 state[4]; -const unsigned char block[64]; +static void +MD4Transform(UINT4 state[4], const unsigned char block[64]) { UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; @@ -263,10 +259,8 @@ 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; @@ -281,11 +275,8 @@ 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;