From nobody Sat Mar 09 04:40: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 4Ts9Md18rJz5Cq28; Sat, 9 Mar 2024 04:40:45 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ts9Mc5V3zz4nsW; Sat, 9 Mar 2024 04:40:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709959244; 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=3UZ71XDwhKX56t4P2Lie/+CBUM1dLPT/INKtE6ZXHf0=; b=Ju5zizFiBoJxfmgxPDRNqJ+E+rM579DbHn6hFzFwb+R1E+W5v5j9dCRJZVPSdLEiXKvNcx ddUE32+/mG5o1Qt8WxisB5BLv7Z4BxkruiGRM3Ffy4w996vb8buPkAB9qgKfWC/Zvsqqm7 u48obEtFnCbUOUJNPMIzD5/JHe01eRQ/9mrZqSls6DBy2SNGok+BvUY0nI8GPFr0RpO3Ep FmrDdMN/hiKzB1d/8B6AvU6OOA2lK2nu1ebkn1PfRkcXq+gS3wuBx+ohaZsbSnlB600i3z 9GkFR5dZllQEGRxNFiNMKoEuvyuxvaF73bqEynIu7p7j+jmv45/aqmn6WRfAFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709959244; a=rsa-sha256; cv=none; b=BEAcxSPdvBb+D0WYZP6U2UsnRSDMxQlCEk48kMNmYgon0Y7NtxKuHyjDLWSMAFKVLNF2R7 NwaNSm3xAyI+Tsn4cMz+QWDnNHGEkfI1lrTH5ym0zk6i7tR7hUbu8nNaxcLhIiyyv1m9iL S5G/LSX29csOfc4iIj4f/co2wSt2iT9e2QNLfbCzesKQby8lmAy5NYPxP3bOsM6y6fdlLU uiQ0ZE3A3Pn4s2dy+0rXcF1vEPc7DSZeztR5PT5fHCFLTfxhsru0MBRpiNr70918CmdsbP UW+zAdrWmAL4PmzDCZw0Q5Y6RjkEzceMKkAVh/3POgv7vliTUkg6SMPFbAddOA== 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=1709959244; 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=3UZ71XDwhKX56t4P2Lie/+CBUM1dLPT/INKtE6ZXHf0=; b=k30oZOKBDaaxCJAzzpjJZcVHztgx8079u8utq1Z3KOaWwjh4nKTi2t7SaaKuBiE8lXy9pz sj0xdtTaHfJ29EMtHvycLys5MqZliSjVl9FN/zNXyBlWss21/nuMp0QOH3Ed1sO1S9tA0n ihYHYVJyOZwhb6tHB+r4tSNXK26C9VeE0oCBP6RFMuMdZr/JvYh+r2sm5J7MO3TCjk/RSr i2DQi57dIJCgkuSMmiG81yZsl0VAnZovEhw2TtU8ztMdfHNcnvkaBFM9XaQN3vLZ592x1V zE4IxCw1RiLG5XjbawWXuqsXFWeFahk1v5ye05TlkHrhbD8oivjsZ5+0EDAZJw== 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 4Ts9Mc4HXSznJX; Sat, 9 Mar 2024 04:40:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4294eiND030809; Sat, 9 Mar 2024 04:40:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4294eib4030806; Sat, 9 Mar 2024 04:40:44 GMT (envelope-from git) Date: Sat, 9 Mar 2024 04:40:44 GMT Message-Id: <202403090440.4294eib4030806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c3751f89da78 - stable/14 - Fix subr_uio.c style(9) with uses of sizeof. 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c3751f89da781f9654b613688a728dbcc1644227 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c3751f89da781f9654b613688a728dbcc1644227 commit c3751f89da781f9654b613688a728dbcc1644227 Author: Alfredo Mazzinghi AuthorDate: 2024-01-17 17:23:58 +0000 Commit: Mark Johnston CommitDate: 2024-03-09 04:27:07 +0000 Fix subr_uio.c style(9) with uses of sizeof. Obtained from: CheriBSD Reviewed by: jhb, kib, markj MFC after: 2 weeks Sponsored by: CHaOS, EPSRC grant EP/V000292/1 Differential Revision: https://reviews.freebsd.org/D43710 (cherry picked from commit f82e98237395693d1825243ff7b111aa321d383f) --- sys/kern/subr_uio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/subr_uio.c b/sys/kern/subr_uio.c index b0c4a256cd17..7a7fe9b0f4f9 100644 --- a/sys/kern/subr_uio.c +++ b/sys/kern/subr_uio.c @@ -354,7 +354,7 @@ copyiniov(const struct iovec *iovp, u_int iovcnt, struct iovec **iov, int error) *iov = NULL; if (iovcnt > UIO_MAXIOV) return (error); - iovlen = iovcnt * sizeof (struct iovec); + iovlen = iovcnt * sizeof(struct iovec); *iov = malloc(iovlen, M_IOV, M_WAITOK); error = copyin(iovp, *iov, iovlen); if (error) { @@ -375,8 +375,8 @@ copyinuio(const struct iovec *iovp, u_int iovcnt, struct uio **uiop) *uiop = NULL; if (iovcnt > UIO_MAXIOV) return (EINVAL); - iovlen = iovcnt * sizeof (struct iovec); - uio = malloc(iovlen + sizeof *uio, M_IOV, M_WAITOK); + iovlen = iovcnt * sizeof(struct iovec); + uio = malloc(iovlen + sizeof(*uio), M_IOV, M_WAITOK); iov = (struct iovec *)(uio + 1); error = copyin(iovp, iov, iovlen); if (error) { @@ -406,8 +406,8 @@ cloneuio(struct uio *uiop) struct uio *uio; int iovlen; - iovlen = uiop->uio_iovcnt * sizeof (struct iovec); - uio = malloc(iovlen + sizeof *uio, M_IOV, M_WAITOK); + iovlen = uiop->uio_iovcnt * sizeof(struct iovec); + uio = malloc(iovlen + sizeof(*uio), M_IOV, M_WAITOK); *uio = *uiop; uio->uio_iov = (struct iovec *)(uio + 1); bcopy(uiop->uio_iov, uio->uio_iov, iovlen);