From nobody Fri Jul 19 17:07:43 2024 X-Original-To: dev-commits-src-main@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 4WQbhc2Cnqz5Ryq9; Fri, 19 Jul 2024 17:07:44 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQbhc12dRz599d; Fri, 19 Jul 2024 17:07:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408864; 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=1iL4wUt93cP1xflFPpAo2QryrgRutkd728SKvKsdx+A=; b=UKhYpd05vkxSw/QzviAg8X74ntrO6kYLGFfQuDDxsMJbkUXOkipllpMgqgcStnjKyLpGaj vT2+UQI8CXGYd+pEXxdIWgmYw6vh01HMfRZVxsQxDpCzRUU3IjFERCafVDSG1bXx22mmYn 0k4RFdXF65pVPN1EDEgQSaHV4dP8Nrunii2LHYs6Ho7hNli7fj8pqOrIlmDpT9/gjKbxMR TjQA9o3UFciFZy4MK3Mst5rtOswlQQcNCNKnIeChsfqC9HuizNXTgNxbt7SdhIgjvgsesU u+ECkq9k1TMAVa6Rg3pjDtFwaQrUVh44VrdbJcH/P722r23LIb0RKYeML9et8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721408864; a=rsa-sha256; cv=none; b=IfNmbDaIxd69Qh5y7774IPaXahzcwZ1wx0mc2mHVXzsiRcuk9wXoTraq+nyXqOuFjeRfjY YA6KL8jXiHtlQBFIfWwE8Dyt6NLbC8TeXimZJht1KUZgpK7hYtB592Mh58/+gLC94R+HHt OMlmDUAcJDJoxtVykiMAdVze3TfWfve7Fx/WIfoyRLUrge3PPiYbceI1PzRkrSXuGalS83 PNvcsGO0VlQgFgeNuqev/ZJHmbt/l34298yrdvDSdUD+bSj8fS73ckAam90ek13roWUL4H ekX30iaZRXFQJOieK51l+AdBGngup74xUzePGCAzpkaS/O2dXvxc9mF0Y6eONA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408864; 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=1iL4wUt93cP1xflFPpAo2QryrgRutkd728SKvKsdx+A=; b=mLPROCHueijk1Qecp3V9kSz8ob0gvRlWfr0vV3FwdTfHddZ/xMwL4zbBTvvyyAkjtUrM6L BpciK0XKVoE4krBYRRThmmjNzs+AgX3ilSD42RWTPUiOaYB+TpsQ5HrNi66HZTbsF2LWIe jrRxrIczZ3ZBARi1o0+O+3xrH7eLqu/lrv5agogxJjg1Q+w2HzMtvhgHxuzhTDjp6uPKMR GuUlGbTRBeMo8bWdYVK3wR50FbtkI4+dR1MiHmKFDm3Y1LDDt+5QTqadBuFIZtPr/Nj2Gl tY/BrUrTzeqMdObU1lJnABtpuwI+mMySItvxOSVGMA6abu4qv4uLN7tH+Tj5Kw== 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 4WQbhc07v3zgPd; Fri, 19 Jul 2024 17:07:44 +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 46JH7hhN027912; Fri, 19 Jul 2024 17:07:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JH7hY2027909; Fri, 19 Jul 2024 17:07:43 GMT (envelope-from git) Date: Fri, 19 Jul 2024 17:07:43 GMT Message-Id: <202407191707.46JH7hY2027909@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: b73445a32f8a - main - elftoolchain: Consistently use item count as the first argument to calloc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: b73445a32f8a3648372c0042ef633fe61b38d135 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b73445a32f8a3648372c0042ef633fe61b38d135 commit b73445a32f8a3648372c0042ef633fe61b38d135 Author: John Baldwin AuthorDate: 2024-07-19 17:02:45 +0000 Commit: John Baldwin CommitDate: 2024-07-19 17:06:11 +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 --- 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); }