From nobody Fri Jul 19 17:07:49 2024 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 4WQbhk1HHnz5RyqG; Fri, 19 Jul 2024 17:07:50 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQbhj5qNRz598G; Fri, 19 Jul 2024 17:07:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408869; 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=wsbnhbWpgCJHFovdhBaFDXV9O+C7tGu41biufNEaTus=; b=NL4TifQ+xWbfem6CKYS6sovZGSH8E3y8RkE65CtqGo+Fw9EIxJNzZkeKXraivasraic1LS mPpGaJj7riFq8Zr2ML0R3Z5GzQxNcSHTrq84wAyQmX9IfJvjjxyl6Jd2K0holNhwdY9UiF /kv/rm3DCYUHxc86RhC86voCQ+sI/+ivswRupboyvtCVwEBOdnMyzjYtXzmvuCxjnreW3O Loupe7NnxqWHPfwBrpPHGeYHU7ERiKRy1KdTrAyvdI/SAu2PtxHSNdqUfWipvJZ+PIunJW FIbhpsm1QdU/rI8dPtrinsartIhAR2S36sMJo/LP5nB75H4V6kQvrQWxXqlYsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721408869; a=rsa-sha256; cv=none; b=lNBqLQqbpVjFJgvnU6dYhcFAbrQZ7mKb0qYkkwjtheUsal31t7fbVnOmlFRWROX9PYH+MZ z1ZAik/f5vxbUkx+BALhrC3lD91wuaeHQnmTLjygPI4crDw3hKMtfqGQYVhtRJa+ouxJje sf5CSW1rnylNf8TCHyGKXyONeysnIgW4SVncOHLfShIgJ302MWPARHhX+C12Bjfvi0+bHf hstAkj0/clVL/CSq5d861SGMzAw3eoaDYSw+ASiHFfHJr/LQ8QWlaFpxjXas5QkY1iem85 eZmdLWGCZid2gVaXrukZ3fh1Y1SIjIzKFvzJO9ix5ZLQL0DF12Z+KP87nnXG8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408869; 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=wsbnhbWpgCJHFovdhBaFDXV9O+C7tGu41biufNEaTus=; b=H9PkQxvXy4nxq0/2++qla68/kqWpj+FYQD6UCckGQuirJgdFXXCHh8YbZu8iM9Urx3grs/ dNi5jo7H8NXx+/Sea8z6oq3tVfFI8g59iWp8dMY/L1Ba+NavwseuEhxWnO9OZ/tNybvReZ JZpYjfatX6ioiTRyjC9lUck9RtVqu632wqNrFWLRJNVL58w5+HS4Uc7nUMaZmgqjv7Qtbj OmE9YETAnkH/CsaFD+c8mSzT677rhWplCdwGeWefUuwMp7NwXBmjRzULK2QIMUxHxmLDCY LG26xiEfqgXoqpxUMh88C4gQf1316SBAeWvHkZYT2AMVOYIX1yaAqCAnK5BN8w== 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 4WQbhj5Ql0zgvh; Fri, 19 Jul 2024 17:07:49 +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 46JH7n0Z028213; Fri, 19 Jul 2024 17:07:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JH7nXJ028210; Fri, 19 Jul 2024 17:07:49 GMT (envelope-from git) Date: Fri, 19 Jul 2024 17:07:49 GMT Message-Id: <202407191707.46JH7nXJ028210@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 7cd0a4c85dbe - main - bsdinstall: Consistently use item count as the first argument to calloc 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 7cd0a4c85dbe5e8cd000f6b293ef2d579d22edfb Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7cd0a4c85dbe5e8cd000f6b293ef2d579d22edfb commit 7cd0a4c85dbe5e8cd000f6b293ef2d579d22edfb Author: John Baldwin AuthorDate: 2024-07-19 17:07:00 +0000 Commit: John Baldwin CommitDate: 2024-07-19 17:07:00 +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 --- 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 c431e187799d..ddb8a8361d6b 100644 --- a/usr.sbin/bsdinstall/distfetch/distfetch.c +++ b/usr.sbin/bsdinstall/distfetch/distfetch.c @@ -130,8 +130,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!");