From nobody Fri Jul 19 17:07:47 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 4WQbhg5Tr9z5RykZ; Fri, 19 Jul 2024 17:07:47 +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 4WQbhg3kL4z59DL; Fri, 19 Jul 2024 17:07:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408867; 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=uJbYlUfxVE7+PnAWKe+or8XAJYwPzXQr3EkvQYNDcHw=; b=RHIeuWeW0bE7vReNgiNMum5xme0Xe0quwHbXnsvEwG2RmISg6MygZ3mi0dTBJz/BgdwgXM 5Zb3QKV8BiIGOKNxp7xaVqFxtMtH9fyR1wUBPyrQhfKf7bk4Ta8RP5Cgc7UQA9CTmZEVTM JxIeO4nybU4JaR7ghwIZzm1sTdSU4mxol9Gb2iqSuamJV5KoT3AnmG7pByOPDtNoFZTRcZ PbrQoLC/m1pv1xGxyG/+O73mo+ViFo+kPZjp2nK25sMLVwat5Iua1j/vN3Yp7Nks0jCR1B kZq8pDQYNVOaG8hNxpDsnLBRu80W//i2PVYHvvbTIaPg5G6DPIzE3nocFxa8aA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721408867; a=rsa-sha256; cv=none; b=FKH8Cfa0X9mkh4yYaok8kJ0/X7lgYTbwiTtihZgSafciV2wJxwSP1L4W7GsWdQA+TIx77T ykx+65JqMOenq3J0IAEI88ZJwv1iB9A2fAv/kRmx+xs1ec/IbieZO8GyKhlRXlHhAyzj2E 0AbZGRpiHYdvTHvDaUcjJB2Ut9XAEtudqKVQ62CmnFBaUJ1gw8SlHrA+t7sy10wK4a+w/7 eFkE6czhp3/fgxvFc/gPjkKrJyO3xUbhXCQGXHd+rQ6tGLtCajcWcOUSohMi/WETW6BFoY TI0LSAKAUekvtufxtonz7gZdJVMGl6LHKOIT5uFhmOGhuKGDndUsKBxcMCx0wQ== 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=1721408867; 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=uJbYlUfxVE7+PnAWKe+or8XAJYwPzXQr3EkvQYNDcHw=; b=Kjw7oucI0LWoZC9nXDBsY8Aa/KYUGrOdeAscyLfa536M/o05Q+LPY1V9f5X1nqMjKiGbKW MQUj73KT7tUo0SBejRayjBbUokGPAv3suO/DRK5SGXZCYHg3mWkiKOJFE9pbaAlI8gDBhe FRtX0NIACeZO4fBqcQTPtCAVzP7Rt4wwFHvmgjg5fc2lrYGQOP6cVVUbP1Ns1usXZIBUF/ dBX83RmYQKP/6ROla64pi5QEQk8a3dS3o76mnHkqRaK8y4X7p+NV9ZKWmIhR8G541FNtls 4m+GNWj3fVeQclu8ki3+bcujO2y9oyDarjCToI7TnjW16053AXoEEp6nNA8JHQ== 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 4WQbhg3KXJzgqX; Fri, 19 Jul 2024 17:07:47 +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 46JH7lHt028093; Fri, 19 Jul 2024 17:07:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JH7lRr028090; Fri, 19 Jul 2024 17:07:47 GMT (envelope-from git) Date: Fri, 19 Jul 2024 17:07:47 GMT Message-Id: <202407191707.46JH7lRr028090@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: 6991cb36f52a - main - recoverdisk: 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: 6991cb36f52a35043132f349a60748eeb382ff32 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6991cb36f52a35043132f349a60748eeb382ff32 commit 6991cb36f52a35043132f349a60748eeb382ff32 Author: John Baldwin AuthorDate: 2024-07-19 17:04:50 +0000 Commit: John Baldwin CommitDate: 2024-07-19 17:06:25 +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 --- 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;