From nobody Sat Nov 30 16:51:37 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 4Y0x0B07y2z5fJRL; Sat, 30 Nov 2024 16:51:38 +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 4Y0x095Bzbz4pJJ; Sat, 30 Nov 2024 16:51:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985497; 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=MwdmXTKarELfExstDJVQTLeu7uhoG+riTlAVqGXg5eA=; b=fhLvxxgRVbw+PjU/K8XfgimeP2WJpnCjJF6E7HpaEIw/fMKWa106atUT1LuccK8GvvDU8U xx+pGE9ioQ68z9KLyKGk+lyVOa9t4kmupcy0W1oohmKFgr3n7ZzgQ8YJdwk8yVi1bvLQp3 nhwUwQaveoCvF2s42ZBfGn17vnyXfC78zqbFU35TGZ9sBtXabhcpJgNvjbtqi4hD21zH1i ZD/fFmCReiXcGBsUjlpMGlwOGIriXorIooHF+3FE3peJvZaryORFo3MHWptZx/qjbGwNXQ raMNBNLe7uMXCESoJBMUa0rvYwzy3gTPhv8+J42diOegS3O5KSgl0vPUno8L8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985497; 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=MwdmXTKarELfExstDJVQTLeu7uhoG+riTlAVqGXg5eA=; b=tWjcX/U9dixAGCIYkywDyl0XVPBHIt7tr0A7dwki3VrMcAkpevomFk52ar8/wwBdbev91y b1LimUqRHj7JUY4hcSUlXy30i6CFnJ3Afzix7GH8tl+DlwX6goY3Q3ugEl0mFoXb/mz7fj 6x633uEVSacMbPVfPqf8YemdGa8ssHTAwwJLpk44/eaHw6369vGKfP8ei+6YIUect2i9kO oA4Xd+ofvrD9pICyZ/rZVwOWjXAXPVTuc/yOvtQAfM2dkpyAS097oGdGvpDhCBaMXqIWO1 aDF2S5qUleaGAfcWcD1MSpKI+alc0oKDdTkEFRuhqOCY/wmzlGf4haFbTE3p7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985497; a=rsa-sha256; cv=none; b=TViNvvd4agYmdbXvGvUMEdyN9kwBs3hmWHyEMT4xqTLf6Y/M9qZwiwIdSjWq+h8wmBFkLr YQmKXA7JW6PjwWObI0tOf526F2EGKz+YB2nECyylQ/sqtFv0qWZM3J77S0ZWNH8v2bCCeW vVPN9/sq78pSISEPbjEhJOv5CRA5y5KY0akFNiYH45z8xqGiSsifIX2KLyPfEgKZrTvqQG I2B/eahmV4N7ZmuDaJkBCv5no73OhFU9YvCMKwE6B6Z53k/7RaRMLF3wCcet8r8hiZ5xqx FTQ8ihGAdsIi+QnoNnAch6h3J2GJd6Zy5RXAo/SQYV83Pp3jSqy2MbpfD9tFhg== 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 4Y0x094kSFzGTQ; Sat, 30 Nov 2024 16:51:37 +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 4AUGpbwA050437; Sat, 30 Nov 2024 16:51:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpb8B050434; Sat, 30 Nov 2024 16:51:37 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:37 GMT Message-Id: <202411301651.4AUGpb8B050434@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: d38bcd8919d6 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: d38bcd8919d6312862e891fa2a58c8865ce55afe Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d38bcd8919d6312862e891fa2a58c8865ce55afe commit d38bcd8919d6312862e891fa2a58c8865ce55afe Author: John Baldwin AuthorDate: 2024-07-19 17:02:05 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:25:49 +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);