From nobody Sat Nov 30 16:51:23 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 4Y0wzv3cL5z5fJ14; Sat, 30 Nov 2024 16:51:23 +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 4Y0wzv1ZvYz4nZr; Sat, 30 Nov 2024 16:51:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985483; 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=5UYwTFe21ESqGlq4gMP7TOOkRYyQJBwtvyjcMqgMb0s=; b=MGZ+vg8/ud4x2CnQSYZVJabPnMi7Wwhcc9jYHhIafQNx1v1g9zWvT/t23M0FRAEUeajRkT VhnxHdC8qwnXjBTH/ryeErquRtoOOh2tXdN4by1e/6PMUP1/3UHbskFvheePAr70bzERJy sqJhaniBDx6Ra6Y0tAYjTUhSLBs+mQ0OX2eCt7QAf6wPnTVWrl0ePzCQwnDMbjldk8JAIy 1DXkXH8ifggcdg58fbR1F4Xu2N4edKFVc2BaQOl2mXYJK6qo/C/rxtO3V2KpvVHR1QVgl9 Bnm7gIh173US/Dz2elWqaeILzERtUsSj/VPa/v8FbDqW/0REAu8sWCRvauBoVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985483; 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=5UYwTFe21ESqGlq4gMP7TOOkRYyQJBwtvyjcMqgMb0s=; b=Iya9C5J0kgFyKbCW/YBVPgVe7H4c6ehnnWM4ATib8CZLeHfrFOHDPwKm20daXFNhWupeJx 3HqwHh6ohJ78IEB+lvIIRYqBxX8+ziB/3cnuslnDJXtkc0SRF8BX8OfXGW9U+hXSoga8mu eYRvGf3VeCbnj3D3ITRJIyeLeBH4ej2imr/BsW34AvFqCVvN+kiYhAIoRUSFnE1UScItn5 oJfYd+tVuC3xVSbZ3caqOa3wR/WkrMg82UTChfJXu5OtPIqwhEFwOmDEPlNE3wZMQINveb 2QrjVAC3Rb64Ho335vOxvBC7sK4DwszyPYOHLYahI2plW0s6gWCjCldy6CUt+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985483; a=rsa-sha256; cv=none; b=wW5eM656eDtzroWn7RH/ugao1KhwRLPtwvIdCwcpF6zED2HlZPoucXN1uvXP971mc2Cjgg LdIWa83WG2ao0YTIYB0u0Lh6GYHdeOyW9wIMnsk1mOKPhx/0ec3dYmRq3qeVNiCK7HVLKa F4epOrHTM2JNC2gpVZ3RbCcV5YrSqqiYcJPV90ZMcyI3USVphZAEb/XDjD5yXE9fONf3ff ABToFvVz+iw2oUdSiR9zclUT7YPouMXkB7TFWoltw9PHc9GZgyJww68qgaDEPZdc+4WZ0G TqhrmeoGSt1gI8ySIwA6dERUZdfezh22ngQXVuCABVcgY568EYGcuigo1EGI4A== 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 4Y0wzv1BzzzGhQ; Sat, 30 Nov 2024 16:51:23 +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 4AUGpNAH046445; Sat, 30 Nov 2024 16:51:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpNj8046442; Sat, 30 Nov 2024 16:51:23 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:23 GMT Message-Id: <202411301651.4AUGpNj8046442@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: 57be21fae07e - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 57be21fae07e5994aaab98910ed4a370a4a8aa2f Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=57be21fae07e5994aaab98910ed4a370a4a8aa2f commit 57be21fae07e5994aaab98910ed4a370a4a8aa2f Author: John Baldwin AuthorDate: 2024-07-19 17:07:22 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:58 +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");