From nobody Sat Nov 30 16:51:40 2024 X-Original-To: dev-commits-src-all@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 4Y0x0F4Frrz5fJRS; Sat, 30 Nov 2024 16:51:41 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0x0F13wQz4p5R; Sat, 30 Nov 2024 16:51:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985501; 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=svNxW35t3QtZHSvU9mjO1gkW2hOaAoPpCAQICRrOGYQ=; b=mM1xUA+TCJ2Z/n8zv1OgioxuTRKqic9soBYJ5fZ7CUAJyDG8+jrvJNApoyC9xuAa3dOoVP iVc7YUPWDShTCpLKe4lxUI2WG+627KgyA5UANpcnEh4gnNKWjtoQUxPc1yYz6TIIb0locH TYVyvpneOPfDaPDab29ymY+lW+Cul13NIwD0B9o9nR85wq3Gb3NLDg5/vvee9ft7HlXJ4h Uohb9WpFdOiznj8lR5gFS96Y9aehOU93jncj4O47uWl5G6oQRZaFxTpXNOwGdlMUIzgPa0 FjyKqltThMIoPMIbKmfb7yxpxBQpy7bfbX/OO8NRJG7KhwzENCA+MIVqzCGJpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985501; 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=svNxW35t3QtZHSvU9mjO1gkW2hOaAoPpCAQICRrOGYQ=; b=E2R2lTitaU2qMtuOzcBU+RmCoHcvhDpGHa3+ZVSxLPRUzxzwoSjtH7mcyntKN7EH/dmZzk o4n2z5/A0D2Os5hBy369uI9z533Njr9+pAEKXB4vbtMWkcMvn4PO6kf63i+MYi8HZwhRVC r0VZHxIpE/HVpgLLnNAtjdD9aDr2NToqooh8ZEMu9Ch62nBKOXVFXW4FYz+Y1od3R/+Itl WNrfCu+i38xtUP2hlJyZnipbIBX3k1I6h/Pk/0uEOlWcFMrutci95hb3QPlMwAxslVepVp 6jwcwj43PEhq67KsXSx6js1j9MIXOak38DoYU7H5wTLsm8pCUVMM12DKs69yLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985501; a=rsa-sha256; cv=none; b=RTb6rCc/EREtzjggnj5rYIlz49It8bLCEeJ2o49J8I8TKz3pGSN/cMoPFcPAN4yNha4GaC N/VusBCnpvhx6939qzy6somb9S/VGjEtT8ETLDayuquwM1OOtVXQ4HjQVcEDUHXILsW1+n Nwd9UUiqF8tMQwiutqOhvEOK+meBz8grM1g1af/37JjLvlFGL4Gr8O+beAljvCZLKr5eal xaOui9MyfTOdf2OOBz0VahhcAl988I9MVav504vOua8l/ytOYyYZmQ4fpVNl7lU+8XczPt eELYljgtenxncHoRKEkVrZwSjI38JN+6jlj74thokhwm+Jwa0PSLBhWUgcgIBQ== 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 4Y0x0F0gGTzGl1; Sat, 30 Nov 2024 16:51:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpe2u051330; Sat, 30 Nov 2024 16:51:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpeJx051314; Sat, 30 Nov 2024 16:51:40 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:40 GMT Message-Id: <202411301651.4AUGpeJx051314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 7380c8ea849f - stable/13 - md5: Consistently use item count as the first argument to calloc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7380c8ea849f717833043e90a547aeaf50908416 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7380c8ea849f717833043e90a547aeaf50908416 commit 7380c8ea849f717833043e90a547aeaf50908416 Author: John Baldwin AuthorDate: 2024-07-19 17:04:27 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:27:26 +0000 md5: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby Differential Revision: https://reviews.freebsd.org/D46009 (cherry picked from commit e8e2ab3c55228d66388a0b33de8c5ac4b3d6dbe9) --- sbin/md5/md5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c index d895e59a3d59..1d99b4339e0f 100644 --- a/sbin/md5/md5.c +++ b/sbin/md5/md5.c @@ -352,7 +352,7 @@ main(int argc, char *argv[]) * Replace argv by an array of filenames from the digest file */ argc = 0; - argv = (char**)calloc(sizeof(char *), numrecs + 1); + argv = calloc(numrecs + 1, sizeof(char *)); for (rec = head; rec != NULL; rec = rec->next) { argv[argc] = rec->filename; argc++;