From nobody Fri Jul 19 17:07:50 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 4WQbhl2V3Pz5Ryrw; Fri, 19 Jul 2024 17:07:51 +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 4WQbhk75NZz59SX; Fri, 19 Jul 2024 17:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721408871; 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=HwhiuRXn/p7D0jtXBMQPTWmwgpUdkLBWIZlINtIIcWs=; b=I1n01KZvulgHMFl939UyhloU9QTlb+cIPMZmZWJor5TT+bydKcvXysVpPDbEaJ3qvKO8mv VuvOApaD2/tGpGnSJtZ6JFzycCmWW85PEkx3kDZoZS12cN7oyfAO8FvqUWiM2waZVbh4Fl 3LBN70xJwrSWGNRHJLL7xBiyOFWvA0gSLEvJbvPIPUBELQKjZlEY8Q5zhTdkTwdlyONaX5 gRTsGRLRfovkHDQixb4pnCsLng7GNM1rWx3hE5nmhWl5xmT6FEvV9c39TJDQi7yS6uw6Xb 6pkbhIVu6b+X6FwsO4SOKqQoCAJTffuB9V9tntFYn/cX/6EefiY0SM8FUHPjfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721408871; a=rsa-sha256; cv=none; b=jNqCdIVOU10H7ITnteeXz2BzW8Vh+1hhMlYRvmXe9zJCYErC4JVwo9jUTHCdrM07xYwMpB UtNVS4siPUkEbkIM4aZm842/eODmMVugSRd5GEsQ88cruZWjYWKsC3QzYWAQeRKxi8JHSp 1Iq48s85zxIAKGBP8A8+XpfvosY8CsL/o57Ikde9Tj7EISNvmESfVi7jHJqCG7yWKik6ra PBAnaT1LcHa7HnwDOHfx/lz77b8dAgZ2wsC5lAjrkFlLxopujVsCdpHW46TOcRuEQ8V/mT Sjh+H88mY3thkGQr9mOcsDagC8ceEk1yxToh55odQ0mlXaNwsPDJ/1TNCJxIig== 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=1721408871; 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=HwhiuRXn/p7D0jtXBMQPTWmwgpUdkLBWIZlINtIIcWs=; b=RdAjzBJoFuoPYVputxXx4Y1OShXY6Z7io/lWHOYT7Xt9aIRHtOH9lrUeFCSmLgXDROpNu4 w8IgzToYWwBph3SUJOg5h1oSCDMNVEcgeUGah9SezSUVYAlXFjg6xXjjFqoiWnvktxqvB8 DwtwXIt1Xy5Z+xOy7v4perbY2zPT50Xl6LNuNLTaRQ4oupL2mkJVc4VrqnZZVPe/mXDbnc PvXorArUM7F7+JBNCFNxeR/CPCNiRdh/s2oSRnKTBEegm1phvBxxVmURBKTZuWYFftlbGV haBvm1QDR14I8ULaHEBGl0MyZ8NSNFAwJhCyFxiAFFVZXdU2KNRaP1y1zCW++A== 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 4WQbhk6gpgzgn7; Fri, 19 Jul 2024 17:07:50 +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 46JH7o0N028282; Fri, 19 Jul 2024 17:07:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JH7o40028279; Fri, 19 Jul 2024 17:07:50 GMT (envelope-from git) Date: Fri, 19 Jul 2024 17:07:50 GMT Message-Id: <202407191707.46JH7o40028279@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: 2ba12978f674 - main - ctld: 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/main X-Git-Reftype: branch X-Git-Commit: 2ba12978f67432a3f88b17704391d28e1fc0e788 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2ba12978f67432a3f88b17704391d28e1fc0e788 commit 2ba12978f67432a3f88b17704391d28e1fc0e788 Author: John Baldwin AuthorDate: 2024-07-19 17:07:22 +0000 Commit: John Baldwin CommitDate: 2024-07-19 17:07:22 +0000 ctld: 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/D46013 --- usr.sbin/ctld/isns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ctld/isns.c b/usr.sbin/ctld/isns.c index 71150a8ae06f..0b836324ff47 100644 --- a/usr.sbin/ctld/isns.c +++ b/usr.sbin/ctld/isns.c @@ -48,14 +48,14 @@ isns_req_alloc(void) { struct isns_req *req; - req = calloc(sizeof(struct isns_req), 1); + req = calloc(1, sizeof(struct isns_req)); if (req == NULL) { log_err(1, "calloc"); return (NULL); } req->ir_buflen = sizeof(struct isns_hdr); req->ir_usedlen = 0; - req->ir_buf = calloc(req->ir_buflen, 1); + req->ir_buf = calloc(1, req->ir_buflen); if (req->ir_buf == NULL) { free(req); log_err(1, "calloc");