From nobody Sun Nov 27 20:35:32 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NL0jJ5HCcz4hk1X; Sun, 27 Nov 2022 20:35:32 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NL0jJ3PKYz4P3y; Sun, 27 Nov 2022 20:35:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669581332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5RgqaQQypPGVpX0TOJMJXdjuYxaUyz5FYAwn5bEeQw0=; b=blJWelDGuM12r1sbq4sxHpBo4Wa7LRuM1D0ZofbxhcBAPu17mMI6I42SNWw2NTXuaIHhox xYzBgrNrNEIezalPX5156+us4rc/TgAfkDHEUC5in8jct41jvdmqt3HpyKvty7I1OFAh9/ 6T32zQOEmV1/VGAOZCHirkjxXgwMNn16pG4BF834YpQfkaeoD4WKAcyFcbFq0t8CP8R+78 f6nvUceOdotdl+5ccs+t7t24K3e4bWF4Ja/6m3hVYXbFzNFdSVu50j7l23p08W/crlY6FD nhe/3eNDOp627eXbtNY+6jvYQ5HbAzUUwFp6L16fD3DnfyfXHBV3T30YZPhL2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669581332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5RgqaQQypPGVpX0TOJMJXdjuYxaUyz5FYAwn5bEeQw0=; b=YxKzkvTKgMl2HWrS4cuZJ8K98t8T+KwDTNIp28ulFP3zgfzvNus7mh0+6egby/OTkjI1kH 57k/sqbX6y6XrM1iAkKO6K/p9ezs4q01jQohUMrboAkTU7mUOC8Z0XTa5J5NA7cby5Yn2n IcihyQ2sFbZ/uVLaAVGMWYIb7Dcb0gyZU5hwGoWnPxk3SJ/DMVmrnOQyg42ERgOIpDeOrD 4nbQ9XY2JyAdRNQavXAbFPg2QJ715YIJkcQfP2/2o4ZzpKnc4wJMPbaIMMDgarvWwvgA2m N6uSGfoifiTx0UrfsE+aM6784bWbLKNOs/rxlfq9484Sm06Da2RQoK8SpAOvSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669581332; a=rsa-sha256; cv=none; b=LkwuShlc3mUuaZ/aJ7SD7T6GZpZO6XFE74ZSlnudP+Li8yLd7Fh/DWKJejCWI9Mp2h3Pny AYPuRQSgF4038agrmYG+wzErGQ3llCQVGPv4XNKn0NRFHReDGbdbxKtI9NpqAn85p04Vol dyMvitDrtrRLa6GlCN7o0RAOdqZJcpXiflDFpyrfimKdeszaLbwrNukHE7/RqEWa0QRwpE MrEocDPGbKlBORX8EoLCP7wFbdwtEMtELye16WB+hMu02gzrdlu3odBcWVA0SENIaCjnUh m0/R5tJw2+lcn0fo9fkvSgwa3HKcTaJv5r7fk08hV9X1AZtNoxFnCEwzUVXc9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NL0jJ2P9Fz1BVb; Sun, 27 Nov 2022 20:35:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2ARKZWlV008711; Sun, 27 Nov 2022 20:35:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2ARKZWHQ008710; Sun, 27 Nov 2022 20:35:32 GMT (envelope-from git) Date: Sun, 27 Nov 2022 20:35:32 GMT Message-Id: <202211272035.2ARKZWHQ008710@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1ea42a28806e - main - md5: Use c89 function definitions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1ea42a28806e420b012d857a666e390d55d75630 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1ea42a28806e420b012d857a666e390d55d75630 commit 1ea42a28806e420b012d857a666e390d55d75630 Author: Warner Losh AuthorDate: 2022-11-27 20:22:31 +0000 Commit: Warner Losh 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];