From nobody Sat Nov 30 20:12:48 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 4Y11SK0fP1z5fbLl; Sat, 30 Nov 2024 20:12:49 +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 4Y11SJ70TWz4TrW; Sat, 30 Nov 2024 20:12:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732997569; 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=wIDxp0vqJZXWo6T9zM6BeEYuGpXGRKvahoEtDAO+TxI=; b=Kq5ZQxy2e0HST78f4wZ8BNStlS6W3UDNC4vgiyz/BjkXQjhrIROSBYajOLgGfBvxumNpe8 fvqnV1ajCcoK8mp7RG+kQhZmSb2e/npA0idOq81CpPRFV/JxjgnAu0MFStMD6IMAiWyGSs MMS8hMcHsuz4mkVYVbdE9lmlgYLv0bua46QUNMzsiVbZ7DMSdGUG/U3Gn+SMNl0Km3cZna 4KPwiuHMBPTz7b0keNKLomVxVI5ATYQg6+YoENFO/X6XbysU84eXsnA4Su59jlaUsJncwR qkDUSFT0stlEdY3TlTrlQFT0ItgzVIAqSt5noa/Mgu/LtQINSMNvzCueUoCKbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732997569; 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=wIDxp0vqJZXWo6T9zM6BeEYuGpXGRKvahoEtDAO+TxI=; b=ipOt+joxgUQi7sHOY7LxsMoiMlCeoeTpT1hEie4zHQdqJCmGjsmskgnd9dzVvRWc5UeU3s VTi2iOFuq6USHEu19/gg5Nd2Sv4AVxku5gqaXw4f0JYXOUF1kTf9FoU+JwO2BVB3naQIUH TIIwUm3PV6Jck/yEQkrfNfj7Rdypk+HA9ESlWW5eFjLwsEualeFNJ2/jFfFVBcJQjWZiYi 9TLQhLecWZTOzvwJjRg4ZocrquiFWAKdJtPoRiXDp/5NDoqnO2+3QpqCLZbHyo93u5Mh0J XG+7t05NyCCLoj01BETi17p6A5p2+gVhhys3ubVNszIl+bE4eYwF5Ab8ad3oFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732997569; a=rsa-sha256; cv=none; b=u9D/rTZAxvLaDyJjQDwCcsRVQvln9HIE9DAV2Ky4thQXC6B82batJ1x7EyEl0tIDYVhCKM i2TAewTe4Nce3hMQm8Fcjb7KSfWALGzA7fhSHFlHX0G4bmlP4CFu0zo3MvabtVFAakUD5H 4VctnXBjhh1QlLBNAqJbUL1LMCi4vZzeX8mfAIbmXU5BDxHggNA64D1sbVZPRCT8WlNcQe mUKl01z6qAvz0hep8fRT3JdYr/tTYq92HmREWL567Fe5++jRRZrgs0QqqyryIP5mRopRwZ NwSIIQd01UapkdpWtwsYzjAmo1zuuNzHWIExptsaToZ+A7bF/lmYBPp88zUPZg== 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 4Y11SJ6bRGzMYp; Sat, 30 Nov 2024 20:12:48 +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 4AUKCmRm026702; Sat, 30 Nov 2024 20:12:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUKCmV0026697; Sat, 30 Nov 2024 20:12:48 GMT (envelope-from git) Date: Sat, 30 Nov 2024 20:12:48 GMT Message-Id: <202411302012.4AUKCmV0026697@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: be20e3fd93c4 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: be20e3fd93c43009b389555bcc4261de309cfab3 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=be20e3fd93c43009b389555bcc4261de309cfab3 commit be20e3fd93c43009b389555bcc4261de309cfab3 Author: John Baldwin AuthorDate: 2024-11-30 19:53:30 +0000 Commit: John Baldwin CommitDate: 2024-11-30 19:53:30 +0000 bsdinstall: Consistently use item count as the first argument to calloc This is a direct commit to stable/13. Reported by: GCC 14 -Wcalloc-transposed-args --- usr.sbin/bsdinstall/distfetch/distfetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/distfetch/distfetch.c b/usr.sbin/bsdinstall/distfetch/distfetch.c index fb8d2cc048ad..9bbaf6a2f137 100644 --- a/usr.sbin/bsdinstall/distfetch/distfetch.c +++ b/usr.sbin/bsdinstall/distfetch/distfetch.c @@ -117,7 +117,7 @@ fetch_files(int nfiles, char **urls) uint8_t block[4096]; /* Make the transfer list for dialog */ - items = calloc(sizeof(char *), nfiles * 2); + items = calloc(nfiles * 2, sizeof(char *)); if (items == NULL) errx(EXIT_FAILURE, "Out of memory!");