From nobody Sat Nov 30 16:51:44 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 4Y0x0J5Ydvz5fJ1x; Sat, 30 Nov 2024 16:51: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0x0J4CrJz4pMw; Sat, 30 Nov 2024 16:51:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985504; 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=5emGVlp0ip1WOEguEkPBwC1NwfN521JFNEzOmTlqaoc=; b=RXWfpQ7G/Nf5LSlQzGLlKL5BSagIEB335l/Hmj2j2Rcq3go4gxUd0JyyHqzHa1vtPc6qlJ 1yFoIbPLEHpV9itEGLVou9nE7WmYrdBGxdaJ+9hrFgQkr2ldmVK5TfmJQNESSJkW+jtGue x/W4/E5m+xqe5enCJnm5jmMVjA/jyYIBRTmLPjJv9INXPFaKR17v60iUoUGEqSfewQFYv3 QSaDONuoVAPfOm+711caVhjLshh+dl4yP9ecQAJ0y559ubYS3Y8TELB1cg+ifN72lKfxAj YTHMrZhfquu/CaO6+JS14PwB+iBYNB3aRO/8zLylVxZ24w9HPwhlTsJUnMd5Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985504; 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=5emGVlp0ip1WOEguEkPBwC1NwfN521JFNEzOmTlqaoc=; b=ytmVid2Ic6Pi9Sg3pVa3gDODL7vmVKCJqsBfEUk8FmSA0ytWK0MyuA5EtyE5uOire7Rysf 0lkkojZTLHqJs8z9MDdOFjNmsTct6Oo9YqAjzjXpirqY0TTWqiDQokTm0LIddxYzsACZRO w77NgQyirDnEtviTa2IKjeC1Wn5x0nnUJdYQ8QN7CdgmuWoMYOwtJAcRgIxKGTOwQiN7h6 CNOnlMyPsuv+dOoh8Gzdqc3eNsYxxZPO37VElaM4v/+Mfkv/3bGeisR3gKIpSWH9emN10p LAbzWS7Vnc1ZbFZ+vyVoSQLHcDTaSsZ04OgxVq10PgCBBb4OIBJKJvHu1mL2Yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985504; a=rsa-sha256; cv=none; b=Y69bumJQWFx9KVbFoYtxLA+F8kcsS0usn6b0+V6zeF3cLejD5x+XbI/NWOvKk0HoNO49vl dAJ6ynNiEjolIzrQ/UCIyBsOs9kQ2ToIvnKTmZVcYnJIvrBqhDcXymyo4/oXnNka5OMaiZ xLr/HWDJUFU0k2lEEbcqcTkWSV5Rv082C8u8Qj7cP5LctpS9lrv4twk8j1wp9huU07lM5A hWFR4g/O6ujP6zEnYcAhfhyzinu/VTIUyVErHRYl6i2FgBxACfILFZU5KMCpkq0dR4AbQt dIlNhMOShjUYhW/acQeSTdqf4QMqo4o6yJ/AKbJagQYcXZS5HdJAns8gCB4GXA== 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 4Y0x0J3rVtzGVy; Sat, 30 Nov 2024 16:51: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 4AUGpi1B051832; Sat, 30 Nov 2024 16:51:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpiGV051829; Sat, 30 Nov 2024 16:51:44 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:44 GMT Message-Id: <202411301651.4AUGpiGV051829@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: 0c75f14512af - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 0c75f14512afe6abaf9c5fea5a9c4bc29923d42c Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0c75f14512afe6abaf9c5fea5a9c4bc29923d42c commit 0c75f14512afe6abaf9c5fea5a9c4bc29923d42c Author: John Baldwin AuthorDate: 2024-07-19 17:07:22 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:28:59 +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 (cherry picked from commit 2ba12978f67432a3f88b17704391d28e1fc0e788) --- 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 3c85c1a3cade..12aacbdef2b2 100644 --- a/usr.sbin/ctld/isns.c +++ b/usr.sbin/ctld/isns.c @@ -49,14 +49,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");