From nobody Sat Nov 30 16:51:38 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 4Y0x0C1Hh9z5fJBR; Sat, 30 Nov 2024 16:51:39 +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 4Y0x0B6BC8z4pCd; Sat, 30 Nov 2024 16:51:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985498; 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=9L5Eue0edMOIs8NwSOTXYXUDEqLKH1Bonq7FCalOZaY=; b=kCaltqn72K2ZUOAyCK8U6Uhoj6o/ezlY2T7Ilt8sLkA2db2OaXlvtbDiFKDBtNBMn2LgSe AVjSao2eJm/op/AR7qCCCxhEmja7BNVY9TUynmfCxLvmNaXBk2onKrRbez7+1B3icK4BWa vvCkOSL5EooUEnW4BuFhmRrewI1Zsjpv1+qJUEO996pSRlC1XPPlkdjllH7XII+iWItccN Pt+b+arQJDFtGXroQaIWnflH6Ph/dGKgndJlmEEK+vkFNtwQZYnx4PQiS9hhUumhgjW9U9 ZRPim11TS/SMb+5EPy6VWg58L4xhm7AhZuJjiLeSUnUbD58hGJ/atCOk/soO/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985498; 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=9L5Eue0edMOIs8NwSOTXYXUDEqLKH1Bonq7FCalOZaY=; b=eDQX3bTaufjIVBVQIPlmcsUz1jpBUeMZpk1jYuWLpuzxIhihcAMZXKlESzo2SULnw+ZudZ 4Xv6vld9R/ZAazK0tUddR1YhzfBibGrYBqAtJrtJIoWpsovHjo0DmCohBJQthG3D5A0yMG zvZ+X2ecVBUmXON/MUM1k8+92GWoJdPU5KvJdsvntClneOxIEQquD26FtfRFl+KvZ6S7P2 fxU11Upxx3XEC+ILVQGdYrMj7EBfo2toYukq8dbnPmK5GG0JC86KjnoBeHVZ1mPogXN1tZ epH7oX5Le9ppzK6OLjdMx4I2U3cc/0hR44H3wNbCkzEWBTbPKUqMMxJaEl70VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985498; a=rsa-sha256; cv=none; b=LgmCgAPIrv2Qe6FJI7ePg4YZ1RsmmYGahAhl4X7XZVeIcMRB62AKsAP3RNHMCBgGaUB4l1 rG+S+DdSAqxh1BEUFEZcw83knkvvWsZcyePb46nrV5guqOAIvKWePEKFBnVUCumj180REQ c1toHC+UIBdH3TzA+SooN/6hEW7DdmZJMAnKLPRgzjOr4KKK3Jvi08Ung2XhgJJZmvjpwR ySFqnuYnUc4IYkhrM+604Esl002375fA532sglD7ksK3vyU18eqI972yuP9WMhumeGCt/N e2+cCaOaWHqPjW9N0LUTZ9CvtNyzVJk4mnisIkjn08IUwEWkcOfSwAY0hWFZ6Q== 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 4Y0x0B5p7QzGhV; Sat, 30 Nov 2024 16:51:38 +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 4AUGpcHr050506; Sat, 30 Nov 2024 16:51:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpc3f050503; Sat, 30 Nov 2024 16:51:38 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:38 GMT Message-Id: <202411301651.4AUGpc3f050503@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: db9ce08054dc - stable/13 - elftoolchain: 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: db9ce08054dc0a4d1614140f7fb87f31130ca7bf Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=db9ce08054dc0a4d1614140f7fb87f31130ca7bf commit db9ce08054dc0a4d1614140f7fb87f31130ca7bf Author: John Baldwin AuthorDate: 2024-07-19 17:02:45 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:25:58 +0000 elftoolchain: 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/D46007 (cherry picked from commit b73445a32f8a3648372c0042ef633fe61b38d135) --- contrib/elftoolchain/libdwarf/libdwarf_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/elftoolchain/libdwarf/libdwarf_init.c b/contrib/elftoolchain/libdwarf/libdwarf_init.c index b85c87c59af0..95ed6147ba89 100644 --- a/contrib/elftoolchain/libdwarf/libdwarf_init.c +++ b/contrib/elftoolchain/libdwarf/libdwarf_init.c @@ -302,7 +302,7 @@ _dwarf_alloc(Dwarf_Debug *ret_dbg, int mode, Dwarf_Error *error) { Dwarf_Debug dbg; - if ((dbg = calloc(sizeof(struct _Dwarf_Debug), 1)) == NULL) { + if ((dbg = calloc(1, sizeof(struct _Dwarf_Debug))) == NULL) { DWARF_SET_ERROR(dbg, error, DW_DLE_MEMORY); return (DW_DLE_MEMORY); }