From nobody Sat Nov 30 16:51:21 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 4Y0wzt4R4tz5fHyJ; Sat, 30 Nov 2024 16:51:22 +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 4Y0wzt0XQbz4nr5; Sat, 30 Nov 2024 16:51:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985482; 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=+EuUCfuXBlDbjoYghEfIPEnyky1VS0jLTm4Lr7ze0d8=; b=g6WjdGmfbkwShh7Hdm8BCpCKW5loqPqlGkRT/af9qwcXXDO7quglDRsQrUwGzM07GbyNl6 n1G0RbKHmlcNaLxO19r0pN2IHI6R5KBhscBWz8C8THPxH5OkfwtXFn4i2/rhVak88m7WLj bbWFWb21hPi7reyAUNfDDSAXPujSE3Ds6saIStG+kTJb9uFC0kICdNdL8ehC5zag2/4+Xl j1kcWL8p18UbBWtYseuoHqCC8AIUEEg2kiJGsv+q8qKBTCKmoErOiRfOSJBZ8jECEEtQQf NHxEKmixdvdSaaYmi6Rn78UBtQC0F48nsoK6neRPwhmXanS5IIR9z2vbOHL3XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985482; 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=+EuUCfuXBlDbjoYghEfIPEnyky1VS0jLTm4Lr7ze0d8=; b=dxHc0FFd5BzGxqSdkBpC0yVb7fZytdztR1TfY2fLmgFZgI88oUyvhgbJt3a1O0MEXpHj6b 0W0RhwUQ/8W/U9qCyWewyC8V4hbVoZAbots7mrD5HNSF63ot8bXDjwvEiBIFCkuoPI8pNx 2JqTNT2Lf54+pyLZowmFAOrbfh+nce4CAaWPOl+8aF2Rtx1doKzzrhJKScfxRhf3v/yczI f2PiD6zlvsIQ+akqr0lqlBUQopPCBidWxMTfL4xp8iw0BaX+xfn0U1dUmpoF2ZAw5OKn9O tyWJvjMzM3/lVtSAiTuJNqMhsjNnC6bhloYfAItWUMlEs1+KPcwQWLb5M+6sig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985482; a=rsa-sha256; cv=none; b=A2eSWHjUaRjADhmqlGtLpCmbdw+MHYkydyVVkJGt8Cvab70d8a8pLt9EsueNpJYNrbj1HZ LYe85X8+tuKEf7CyyAxeO18yNAE7oz4cCWNjQYJDqLUY1VArKBm40p+zE/Xu7r6dVBD8kZ qrAiCp8JfleqzLfj9nQbdyDrl6onF7+4pL2J5RSBPD2IoZe5uNKE9aRaHgpmQL05SVt/NQ DSFASZRqyO8peC1k1rMOdGK8vTZWaVqoPVgE8vRvOl81AW+j7PA7i2yTYu0Ux8GXvuo59i MkH8Zy0E4WtEzxNHm/s6PlPZuZd33/a27WunZdmBTm0bGEORjnxZoVkEez4eAQ== 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 4Y0wzt08hCzGQM; Sat, 30 Nov 2024 16:51:22 +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 4AUGpLcl046385; Sat, 30 Nov 2024 16:51:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpL0k046382; Sat, 30 Nov 2024 16:51:21 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:21 GMT Message-Id: <202411301651.4AUGpL0k046382@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: c28d88cda423 - stable/14 - bsdinstall: 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/14 X-Git-Reftype: branch X-Git-Commit: c28d88cda42386709d316625c102b4d00a8bb9c6 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c28d88cda42386709d316625c102b4d00a8bb9c6 commit c28d88cda42386709d316625c102b4d00a8bb9c6 Author: John Baldwin AuthorDate: 2024-07-19 17:07:00 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:58 +0000 bsdinstall: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, imp, emaste Differential Revision: https://reviews.freebsd.org/D46012 (cherry picked from commit 7cd0a4c85dbe5e8cd000f6b293ef2d579d22edfb) --- usr.sbin/bsdinstall/distfetch/distfetch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bsdinstall/distfetch/distfetch.c b/usr.sbin/bsdinstall/distfetch/distfetch.c index 01f5f1aa214b..e18fa0225048 100644 --- a/usr.sbin/bsdinstall/distfetch/distfetch.c +++ b/usr.sbin/bsdinstall/distfetch/distfetch.c @@ -131,8 +131,8 @@ fetch_files(int nfiles, char **urls) struct bsddialog_conf mgconf; /* Make the transfer list for mixedgauge */ - minilabel = calloc(sizeof(char *), nfiles); - miniperc = calloc(sizeof(int), nfiles); + minilabel = calloc(nfiles, sizeof(char *)); + miniperc = calloc(nfiles, sizeof(int)); if (minilabel == NULL || miniperc == NULL) errx(EXIT_FAILURE, "Error: distfetch minibars out of memory!");