From nobody Sat Nov 30 16:51:19 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 4Y0wzr4Hm3z5fHs1; Sat, 30 Nov 2024 16:51:20 +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 4Y0wzq65krz4nLn; Sat, 30 Nov 2024 16:51:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985479; 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=SyBgsUBaTsrnfK3rVVVApYunj+HDdiYxNDCxuC32Cs0=; b=H8tD9SUBF5ndtD1tXDBeS7PvdRE1ZrjmB0k5PaVdZrSIPtbdISbpkud69tsFFTGM37P+Ss eC4hCtlcjA0xzElITR4V4BIk26i2yq2NsN+kmsrA/RwcWcmsqLasOaDH64sF+7zRuVuL9N mRk3nGjh5I/+fVu/utmqVH/U6pKv8FUSnKGftz680SYMq5mNhcevAVJ8FRc9IrFWuAO743 JtV3vPkapcIWiRqUweiX7lx31HEqScg/Z68EBrxNOdSKne+UQgDNoSGqW0AFnbd8JdKxvj tgZ5j4i7K4J95/zWKfFrN/g67y/SgyqzuKtL5VioJMPuDOenRXoxWh6nm/wOjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985479; 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=SyBgsUBaTsrnfK3rVVVApYunj+HDdiYxNDCxuC32Cs0=; b=NfS3OxEyIb+UnralV/7lAvrw7D0KXLzbqv7UZx3BkW8u/5+ydWUW9cPv5E2nINYWNLsXZq 9NCbTXUbhXeKWC10bddjSq2oBfvtLJzah2VyliH/Jwhupe1AlpnqG3NjGeC8uuR4Y7ZoaT DoB2CRK49wfbFad1Tcokw8oNyYn6xj4cKLJWpKs9xVSt5DaBiS2OMH1I6aX3mUAAL+DlY1 WAjUuwKdIaCuB38tYzXzWgeji6umgXLylkwQHuM2CawrsO2ElPPP1uE7xjjfkhdrNnmKVE tcJu5miQZqfMSvPUZ+RmnvDykP2q22HHou6Mh6aIkdEbfDGi3nYHvFjqHfTDzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985479; a=rsa-sha256; cv=none; b=YLu9wJLO6r5tDKVhJbNiEEqeIp38gfvZGfhUG+SkiEm/WXxWPtuSdlOg5PuEUMQIcSXFHW W/WIiEJug45IkkjmG6RC6k+TOPjtlZUQ4+q+7NoJflOOUwoei1GLI4dnc//fWWNBHs8kwX VqL2f9/uBn9i4xjRgO/0RjIp9jELZ1aFQkdlbn5ZUMA4gtZSSlKlj1On6G8w8moN0SJtje KaPt6p921mzHKw/zD+7RIb9Gv4GOtPF3iIDFFfYvkF9v6l6okyfjzKy4uD5qfCX38r7qre 7Qt1IME1H7E//YqWJYaDYyMGiLEE4glMkUpNX9kiJNrH7dwiLgj+paUeXeTUQA== 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 4Y0wzq5fs2zFxg; Sat, 30 Nov 2024 16:51:19 +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 4AUGpJ4e044378; Sat, 30 Nov 2024 16:51:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpJsN044368; Sat, 30 Nov 2024 16:51:19 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:19 GMT Message-Id: <202411301651.4AUGpJsN044368@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: 65a591b5a081 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 65a591b5a0819501f28d54e40c09f48500e9c31a Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=65a591b5a0819501f28d54e40c09f48500e9c31a commit 65a591b5a0819501f28d54e40c09f48500e9c31a Author: John Baldwin AuthorDate: 2024-07-19 17:04:50 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:58 +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 43b62fc142f3..91f42c904c52 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;