From nobody Sat Nov 30 16:51:17 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 4Y0wzp13w7z5fJ0l; Sat, 30 Nov 2024 16:51:18 +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 4Y0wzn5Ftxz4nNq; Sat, 30 Nov 2024 16:51:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985477; 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=m4AUPYrZTwa2a6qILAFEiqTA7MFDb8WBzqZk21B9hvE=; b=qXAqBqsLktYC10ou7x70z9ts/MtAzBrnns5QnsDKNGr8TLGhoKSQH+8pGlxxGyTO5zV2l9 3mTlP43gjBBoj4gk/M7zHCx3cY/QnbKVkwhFidy/MVnF6UmMXEcjeGuYEq9LPsXvyPPuAw fEBrbZdw63EX28BW8CyM5C4FVdQqEC13R+pLVW+QtjbllVajRu1FSL++QZzw73zjs26NSm bxXNP4SRSaehP6/iuPAD+s5P9g1HaJgzPTktFFhQgc6a5XlohGWO/IvtF6pXIiRhoJOoka pcgyRtVUAbSG8XTQtvON61OyaAwTX+zUksYaVMtLvVa9KorvmKhmxRns1mRV3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985477; 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=m4AUPYrZTwa2a6qILAFEiqTA7MFDb8WBzqZk21B9hvE=; b=Slqv8v85Qs7+wWn+iu6picJ5JCqAkaWCMtn9OHoPW9LRMJEcIIs7ReHf6a9oJNNsPWHgBx GR0ucYpBMQoS4LE9Cy3eut6v7cAQHqJO7j9zzV4ctq8B95nQpK5f3T07AAgMRINEybVOU3 oRADyiNT9/lZ14uwSQZXwTU52gmUa+w+7q/PIQyMyRSsDf/bZsehvdsBmEpsVivEOSBCIx CVJfutBXGnV84+9XcPnlX3EblL7eEzMqywU2Zj32SgEhg9FEEcxd0JO/cb9PmS5JuKWBHf ml2hEmzdpa16nY4CLK/q4smIbvrovlB8pVn6KrGCC1Ni79TCRMY1U4pZP9LzSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985477; a=rsa-sha256; cv=none; b=HtznSLEXqO73LDYLGsGVprkfqU1WJn+fFMJ+RmKvSa6AMrZVJ1IuA0mi9HMKE8YTA05Gu0 0wmtVoGXn7a67YPcdL5UhzZmAjgOZFkEhopCOaelE2ii67K83TX5f7dL/cI+95zNOkOcuj geKgGhNzW3z3CcfgCa0X2l7cqyAhTwJRVY/v9dqqhbtGWot/rEs2rwllUoA4iCkp1upmvs swnwYYvhLTwCjOUX7GScAaCctplhxzjsVUQf9hhmcVTG9SoWJXpyf3+NE3+fr1OBiC3txV P9bA4MIk0sDnKnVxznmknNKfKh1ein9m89CyqzGMDR+08gb2rka0Dt03fVAfPw== 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 4Y0wzn3dlCzGNl; Sat, 30 Nov 2024 16:51:17 +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 4AUGpHBX043794; Sat, 30 Nov 2024 16:51:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpH69043791; Sat, 30 Nov 2024 16:51:17 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:17 GMT Message-Id: <202411301651.4AUGpH69043791@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: d480a358cf00 - stable/14 - lib80211: 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: d480a358cf00a98fc76c0779f164ec791ac3a417 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d480a358cf00a98fc76c0779f164ec791ac3a417 commit d480a358cf00a98fc76c0779f164ec791ac3a417 Author: John Baldwin AuthorDate: 2024-07-19 17:03:19 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:57 +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 (cherry picked from commit 8aadd10a65b11f18950118a10569233e1420ab45) --- 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);