From nobody Fri Jul 19 17:07:45 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 4WQbhd2R0rz5RyxJ; Fri, 19 Jul 2024 17:07:45 +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 4WQbhd1cFKz59JX; Fri, 19 Jul 2024 17:07:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408865; 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=VBwiIp8lA5woHwsh7XM1XMpjioIcbFZ9Jp8XJtFnm7w=; b=P3dktwt3FIQWMEvpq4YhbGo+YuB6G1JJ5XtGavO3R4N27FgsD5Nl7o1TCc+/PqXWdRH3wm /cUjjrc7/urZQI3PX1KxV1ody9VoDEereCtIejfKfXS+XRSGhz32Iy9sq6V31vltsiIN+/ 8Y183EXr2r5bvJKVG9W9gNDpB28iUtmQywn8EkkRqN3hO99NtNRpaGlQTCwzbpteawqViR sJ5W50KBIy9CwhpT/nGz9vfqkC7sOsEsUBJPCGQW+s91niwORe70wvkF9fVCBR46mvmZ3e PChjvDExLjAgUXt2M5lP/IQFfaIIov7pvsNM1NXm1+nQXdj7CHlsUlyY5qsaOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721408865; a=rsa-sha256; cv=none; b=WBaOAod/E99ylzycz3zttPVFVF8u8cKC7LFAoE9qia9akEn4STnUEqPFV1h+L3TVjpBd44 sPnHLgtFebG2y3MqzHW7r/owLG9+s0ACn+I258yFcRBHogu0+TG80bZV6a/NS6liq9FCCa 6hq696w4SL9fMEdmCYNfP/xszUxE74VQjhG+WQy93LMnwaCpF7ZygoroK0UxpA14ypcRAZ pe9NtwfsWZdfZOLQO4xjEn/I1++Is3wUo3cWAbJo39enr/PxGkjf9IYVO52QIj6RLQtuvd TsZoNpIN4weZsIJEcTjtCTTMZG4kxH+iwbDb2/77yP3WlUjxjdOCPif9ssjfPw== 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=1721408865; 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=VBwiIp8lA5woHwsh7XM1XMpjioIcbFZ9Jp8XJtFnm7w=; b=RqccIh43dFqkGkn/pSlmMmsa7QEZySG7Vw0urRSDke80v3jYu6+wx1SYIRqJIhpjB2zpDN uEw4ilo3oq6ImufFtLcuQkuOMMrTjEH36S3CxN98eWnzS1bhMClMVBZvVpSWbpyUznGblr 8QDkWbf8tywzt9u0ODOj2zgGMNpQl7QVSKyi5Rci/16ZqpBUnc7SECPUQgZTlAY6QMCxvv EiuopLR/2Os2/a66WyNNiIjX3E8LjM7WpCCauUF/RUL+rMesYdYmDYYpJawGaf4M8jw8Ne hhhSnU3BmsNrmHMTNuV6RW3PVN8Ti9/TiyGyftyNwUAK5KkARdo8+D99L9mcvw== 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 4WQbhd1BZKzgn5; Fri, 19 Jul 2024 17:07:45 +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 46JH7jKM027973; Fri, 19 Jul 2024 17:07:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JH7jMU027970; Fri, 19 Jul 2024 17:07:45 GMT (envelope-from git) Date: Fri, 19 Jul 2024 17:07:45 GMT Message-Id: <202407191707.46JH7jMU027970@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: 8aadd10a65b1 - main - lib80211: 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: 8aadd10a65b11f18950118a10569233e1420ab45 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8aadd10a65b11f18950118a10569233e1420ab45 commit 8aadd10a65b11f18950118a10569233e1420ab45 Author: John Baldwin AuthorDate: 2024-07-19 17:03:19 +0000 Commit: John Baldwin CommitDate: 2024-07-19 17:06:16 +0000 lib80211: Consistently use item count as the first argument to calloc Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby, emaste Differential Revision: https://reviews.freebsd.org/D46008 --- lib/lib80211/lib80211_regdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lib80211/lib80211_regdomain.c b/lib/lib80211/lib80211_regdomain.c index 189d4661c78b..db353a69f4d9 100644 --- a/lib/lib80211/lib80211_regdomain.c +++ b/lib/lib80211/lib80211_regdomain.c @@ -441,7 +441,7 @@ lib80211_regdomain_readconfig(struct regdata *rdp, const void *p, size_t len) XML_ParserFree(mt->parser); /* setup the identifer table */ - rdp->ident = calloc(sizeof(struct ident), mt->nident + 1); + rdp->ident = calloc(mt->nident + 1, sizeof(struct ident)); if (rdp->ident == NULL) return ENOMEM; free(mt);