From nobody Sat Nov 30 16:51:15 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 4Y0wzl5jKMz5fJ7K; Sat, 30 Nov 2024 16:51:15 +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 4Y0wzl2MN4z4nFn; Sat, 30 Nov 2024 16:51:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985475; 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=DVDdOVo1Ksh4XsqFlJCQmtIf883hSFqu6pQ3JTc3lvU=; b=aZRjiTqz8PHaAsebok1FpltRMGYI/KqiQuva4SNQusLeDNL+nfVgNwRlXA44+qc0KKiWdD Q2R6bec9bU5g6ogegP+bQP68frGVk7vaoa6f7EC7SOcIpxM9Yyu1C2fc+foxP40SF5QJaE Km+h0RjGsjwGoICc6hlMZDRzAnl24QtDhCBCd0fispqPsFe30kjCRdEq4kAAuw8r1cuVyC xhnvnYpqVzTfW8tPS7HO8ZhIjmKbMeGEZqG/oN87C5ZKbKciJp8cCQO6NT6yV4haXl6b2P Ybg4YMFk0ZMGcBbtZi9A+TIwKrASpqDZHWIYlyQumiq/LPRkpWhooIjssVi5Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985475; 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=DVDdOVo1Ksh4XsqFlJCQmtIf883hSFqu6pQ3JTc3lvU=; b=CBU0C13T7Mitq1HhuRwpAas7jGpGMCK2KLBNz6KO0AK70Q1NUYsRijk3f6PXjKifzrXn9M AfzfuCrpyy/ssbjwo1eLzP7+0yaofyR1NEkX8LMbq+8g+5yMmXWb9yGP8nfXfrdxyM6c2y K6LVRQQzIvGWQMWd1J3POSNKJPm0kZ1D5XFD5PYXvlgMZSvP8lKZV0d8NJjnc2RafrRoOo PP4adCo9+TBZHsFMvDaecaHjDWmg49SHjOJSSVMeONkow2ZOMVKXyLQEw+twVSLFHb0HWz ioP0T22Kp2h5rixWr/pNViP8nssb91fodSHM0K0YdEV6XaKpBdfPliC1bkGCfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985475; a=rsa-sha256; cv=none; b=Wo/dDuG2NBEiN1QL04FFXpHcSWxYyYS64h2tafZMW97W4lFmSARzGW1fhy8Tt7anePEB5B oQ/7MUQIMXyzPGVxhi3slEI/DzROkqkyxNnTs5ZWPYyfQ6bIs88a2agZJk1bHnPmL+Ru6T LsfMGuOS08qBe5+XcuHGMoTLSrQ9IV7dhDmIhQnhyo9iH9HaGPw2Bl9b+/BgE34XX+Ign/ BabyEbd5n8xSbL6bK75nwxWYi1o5mTSpF5xKyxq5VDyyIXcFmpgAvPXATnARv/bsO6JW70 NZx02hZmnZx0mDu7q5Ulzt3UQuENZJWwPLo4ACfpEBR6MuSQQPH7Hx4nINqAPA== 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 4Y0wzl1wMDzFxd; Sat, 30 Nov 2024 16:51:15 +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 4AUGpFmt043669; Sat, 30 Nov 2024 16:51:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpFLE043666; Sat, 30 Nov 2024 16:51:15 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:15 GMT Message-Id: <202411301651.4AUGpFLE043666@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: a8c5babb3575 - stable/14 - libgeom: 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: a8c5babb357526afc74c96aa0087a2c846ffcaa3 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a8c5babb357526afc74c96aa0087a2c846ffcaa3 commit a8c5babb357526afc74c96aa0087a2c846ffcaa3 Author: John Baldwin AuthorDate: 2024-07-19 17:02:05 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:57 +0000 libgeom: 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/D46006 (cherry picked from commit bf3b889a5be141f3abadcfc5a1d1cbdc50273d72) --- lib/libgeom/geom_xml2tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libgeom/geom_xml2tree.c b/lib/libgeom/geom_xml2tree.c index 49cbb0385770..2d2c43e29e77 100644 --- a/lib/libgeom/geom_xml2tree.c +++ b/lib/libgeom/geom_xml2tree.c @@ -407,7 +407,7 @@ geom_xml2tree(struct gmesh *gmp, char *p) free(mt); return (error); } - gmp->lg_ident = calloc(sizeof *gmp->lg_ident, mt->nident + 1); + gmp->lg_ident = calloc(mt->nident + 1, sizeof(*gmp->lg_ident)); free(mt); if (gmp->lg_ident == NULL) return (ENOMEM);