From nobody Sat Nov 30 16:51:39 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 4Y0x0D2sbfz5fJDT; Sat, 30 Nov 2024 16:51:40 +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 4Y0x0C6w6gz4pLh; Sat, 30 Nov 2024 16:51:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985500; 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=UkjPPM2F0GAf3atVrN7k1qd0BGQbJ6JkM52UOMuC2XE=; b=VJK9h4uW7+VqeHcSe0426BFzYbJBMdo1LqD1Xb3rz4VO7MpeN5rOjHByJp6FEPBSBCtbbs rSASWcleqEjyywyNPFhrWUkJgXarcPAyYUyXdEnhUvmOi65V1e3dsDeWoQYSJ4PyCBedqG C2i7Gq8BhVugaxYS+xPydzAELe+auPNHHO4UMZVGMNvS4G6/nWrjvdiS2aQyiwgYx8t1uf vmcq95qQoeUJI6OnyAkO5zIwdBLzmCNggZjTAWzjf7XRgfWlmhaaG4oifAKh4C5IL97jFP bFbellMGKd/dq2itLANmeH/9jtCvv9Tgx50motVC8W2IzGIQFQ4sxzjMbQ/AFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985500; 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=UkjPPM2F0GAf3atVrN7k1qd0BGQbJ6JkM52UOMuC2XE=; b=xaOqWzyV1XobRUZnn9TyP+5wLCKo7VEE+KI7xV3ctKqrupgJ6gNyy6azbrUyppeGt6g8El q7bfJB3rARH59Vle+suQ+w3Yu++XNcyBNIV8NJ3skBoe/sAnE8aH1nuELRkvzAVLk1PUI4 p5WvuzXIpqlfqAgrBfIWT8SuUJ4oywY+PfAKFpwUO/a+Way6JudWFZttKQXFgzXw999U95 tu0+w88VTgIqulyehHVGhFKwtbsPenDdjimMZFDN2jHdtlkR7WUInjt9hoU0O/+LNbykNh B5+QSIpgi350XE30teqRUOZtO/vlxNMY4nDlMvDGSAKx4C0TfyBOCV8YlDPPnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985500; a=rsa-sha256; cv=none; b=NFs7graV/ns4HOUAp+SyX98b4/N2n4PI8WJ2xFzgXzdl1LKMNq/h8KcRi6USI3u3AmMUZ1 iQmlelpsE9xntUOVqNHSqtiJWPhtGc190h/UZqX9wt6BVGYI7sFdN3Z+b/YePodrs2gXL3 a05ctcuJ2mHwpPs6L4RztaYwDVJLf+4uPXCXjw7FouUM8nLXhu2QK87FP3KkjTuutaOzON GF1ZRjKDMxZt2NtVeHeBTMcttamlh1cvGHBPyZNCxAEebFPP0mpHIE0KtgP7ZKHp6J8yNN DQr/MPwyymdTJA2kR+CmYKE9KlbgT0ZBX6byUCNjCSG+t/DJ8MKqPd5re9G51Q== 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 4Y0x0C6WwPzGky; Sat, 30 Nov 2024 16:51:39 +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 4AUGpd5p050566; Sat, 30 Nov 2024 16:51:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpd68050563; Sat, 30 Nov 2024 16:51:39 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:39 GMT Message-Id: <202411301651.4AUGpd68050563@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: 73b0985e68e5 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 73b0985e68e554719cb40ba026418c80ae8740e0 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=73b0985e68e554719cb40ba026418c80ae8740e0 commit 73b0985e68e554719cb40ba026418c80ae8740e0 Author: John Baldwin AuthorDate: 2024-07-19 17:03:19 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:26:09 +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);