From nobody Sat Nov 30 16:51:42 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 4Y0x0G53KFz5fJDV; Sat, 30 Nov 2024 16:51:42 +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 4Y0x0G2CBNz4pH9; Sat, 30 Nov 2024 16:51:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985502; 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=wiDVETJDAkc+VhHwwUpa8gzLVty09uz4A2p9vwVymWE=; b=MgErkBFX3Umod7+96sBhLHit+1LyEQsBn/1ehkzg6pfoTKhgjbRXSd9BnJ3ZZctrsiKU4w MTRLnki8b87x53vHoWWlyWm71vaF+SWEv7QPy0n+ZEYOuGlkLQW8VQi6h9feCfKqam1xfp GVVfhQ8+GQO2ZhLalNEBL8GEqKdfTLjcvI7CIHGN9DhLi+yCmoUNelp0JM7cp/RiIyBWDP ne9iY5sw1XbY7ppuySroZuY5wrHWn2aq5PlIyhFhcMkj+wfbMBjuYaS6zu3AMMq+ekQ86q M0UCweD1BzsZGemUcwGxJdwiHWm5AoNRqBTU/5UU/oiQ91Sv7roRKMpwPL6bFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985502; 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=wiDVETJDAkc+VhHwwUpa8gzLVty09uz4A2p9vwVymWE=; b=fQdcEjS+5BvYMkLGb2wDZjrEWkZgwwOe6UN7uEUYKnhpafX3DOKo2ocCLVsQES4hjq5uFt fwMuWx8uhX+sPlpXLO4cmH9znBlssztJzetXu1lwTMFCxSf5Lqhc2mbA6Qjz+iJDE4p1Qd +6wvAVmn87vRTGJAwcDVvJ/oZ04cSNyLEA6mt67rIh0quqZIbFP07n/QPDh05kmvoFi6Vz v0Wp4ldwDZ3bKcSUlrqzCO3nbCd+5bjtc6XqPHaaG/A2o4nkqibJF2cePXwtkqI+2L8FNI VIG0zVDeH4hcgyoZLNlLQ+NlLyzxeC4kFPKyEoIGtBz3m5Rx4axBjPcyDL2ocQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985502; a=rsa-sha256; cv=none; b=jI/SMHZoi5We+7jp59o3pdz2ClCC+0F0ixgGc/rjHqRkMbKCEVUGDaw3Q8Jj7/8KHptgwK BliI9ss0Tp2jGKJ6gu2pCDHhflQJxcZSqXqPCSGRBqp1eyCv9fqdsF38kTF+O0sBzUwIha 9CtsfLEFAw5zXJ+5f6dYAkgrA3WUlD/vp2C7M8w+Y08Md+aTHa1RnmVqq8gVDlZst5t7Q/ 1L+JgxpYoU4jDMvBq2G6Eo9UFgIrr+ojrOkvMaI3zaUELxTq/9FV/7gbYCBXqMjnWY2O10 4RVmPC8UnW86WJv69vezvxTAmbYe6ZsEJRs1OmyVNtzhHVfc191ZAg5GBPZrYA== 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 4Y0x0G1nFZzG0S; Sat, 30 Nov 2024 16:51:42 +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 4AUGpgjL051704; Sat, 30 Nov 2024 16:51:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpgqX051701; Sat, 30 Nov 2024 16:51:42 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:42 GMT Message-Id: <202411301651.4AUGpgqX051701@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: 87c5b0f8d80e - stable/13 - recoverdisk: 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: 87c5b0f8d80e86f473ce10447b797f59afa1d998 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=87c5b0f8d80e86f473ce10447b797f59afa1d998 commit 87c5b0f8d80e86f473ce10447b797f59afa1d998 Author: John Baldwin AuthorDate: 2024-07-19 17:04:50 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:27:44 +0000 recoverdisk: 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/D46010 (cherry picked from commit 6991cb36f52a35043132f349a60748eeb382ff32) --- sbin/recoverdisk/recoverdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/recoverdisk/recoverdisk.c b/sbin/recoverdisk/recoverdisk.c index 2ff5f427113c..5fd27a09cb6e 100644 --- a/sbin/recoverdisk/recoverdisk.c +++ b/sbin/recoverdisk/recoverdisk.c @@ -82,7 +82,7 @@ report_good_read2(time_t now, size_t bytes, struct period_head *ph, time_t dt) pp = TAILQ_FIRST(ph); if (pp == NULL || pp->t1 < now) { - pp = calloc(sizeof *pp, 1L); + pp = calloc(1, sizeof(*pp)); assert(pp != NULL); pp->t0 = (now / dt) * dt; pp->t1 = (now / dt + 1) * dt;