From owner-svn-src-stable-11@freebsd.org Sun Nov 19 00:32:18 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01FBBDE1092; Sun, 19 Nov 2017 00:32:18 +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 mx1.freebsd.org (Postfix) with ESMTPS id D039F354F; Sun, 19 Nov 2017 00:32:17 +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 vAJ0WG2g020014; Sun, 19 Nov 2017 00:32:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAJ0WGlx020013; Sun, 19 Nov 2017 00:32:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201711190032.vAJ0WGlx020013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 19 Nov 2017 00:32:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r325989 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 325989 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Nov 2017 00:32:18 -0000 Author: emaste Date: Sun Nov 19 00:32:16 2017 New Revision: 325989 URL: https://svnweb.freebsd.org/changeset/base/325989 Log: MFC r325444: ANSIfy sys/kern/md4c.c PR: 223453 Submitted by: ota@j.email.ne.jp Modified: stable/11/sys/kern/md4c.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/md4c.c ============================================================================== --- stable/11/sys/kern/md4c.c Sun Nov 19 00:31:13 2017 (r325988) +++ stable/11/sys/kern/md4c.c Sun Nov 19 00:32:16 2017 (r325989) @@ -90,8 +90,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; @@ -107,10 +107,9 @@ MD4_CTX *context; operation, processing another message block, and updating the context. */ -void MD4Update (context, input, inputLen) -MD4_CTX *context; /* context */ -const unsigned char *input; /* input block */ -unsigned int inputLen; /* length of input block */ +void +MD4Update(MD4_CTX *context, const unsigned char *input, + unsigned int inputLen) { unsigned int i, index, partLen; @@ -142,8 +141,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 index, padLen; @@ -164,7 +163,8 @@ MD4_CTX *context; /* MD4 finalization. Ends an MD4 message-digest operation, writing the the message digest and zeroizing the context. */ -void MD4Final (unsigned char digest[static 16], MD4_CTX *context) +void +MD4Final(unsigned char digest[static 16], MD4_CTX *context) { /* Do padding */ MD4Pad (context); @@ -179,9 +179,8 @@ void MD4Final (unsigned char digest[static 16], MD4_CT /* 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]; @@ -254,10 +253,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; @@ -272,11 +269,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;