From nobody Sat Feb 10 16:38:24 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 4TXGcc4bNCz59y69; Sat, 10 Feb 2024 16:38:24 +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 4TXGcc3dKgz3xFY; Sat, 10 Feb 2024 16:38:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707583104; 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=IY6ehb4gBwdGZgHdjbZ9c68u1q4najLkUmQo3VZl3iU=; b=W57aw12hTfYlt7m0SWN45+tmOZCuUiQJwbZ0L3ZnBcFaSl/3KZ25pg6cYfyUU5dylsOOr4 0L3gBWJixE/IHQ8+syHawoYBnHhraJgA8COvKisPxi0wEDsd7B0+lUmDYCmRipgHSONyLj edmOuqOXyrmfh9ZHbZErpMSm/qR3lpjWFPhMv7XaqIjTiVj5CCHhwxB5lBVHeJmkkrJBzD He0KbrlZ838E2bs2P8ixXI74NQs8QINfFPW0zS7xPEBkz+i4fyG4CYk6DRzkaRj7SL2oUM nMyRSR9kG25iqXBlM696mhafSVkYw0sTYZFM3aSFKGDssDb6M0Kl3KzYS0BoDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707583104; a=rsa-sha256; cv=none; b=IsXqKk5Dd3G99IRQBZrhVYqRDeHI95fsCXr/xPyB/9HKUJIKQnOf9iQwRBFgEaRl7szGQd kHzwP5PPWpO73bms+IyDzCeM18UejtOO4DwbVkDCRAqH1yuOeZPWuc2dC4epl/I6zkZZnS O7s8uAvbL3OD5L6brSFWxffv9ofUCh/4wvYmTsaJg3bExrNJcojqR8kZnHhLtpqt97JH+U 14yrBVvbYXDB4yD4D7Sr541Eh0P5yXuUtQZT76WHsTp6BRoaYHujEGmvDx8lm2dMSF9Cae rUXW0mrEzEb9oBOBA7VwBn/xiCHI5oVBvL+Hj5yw072UIvp95XVnlwDZVSwE0Q== 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=1707583104; 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=IY6ehb4gBwdGZgHdjbZ9c68u1q4najLkUmQo3VZl3iU=; b=bo2yn0yAEPwFh/DHpERRGjy0HjrofxG1LS+fQKsu9K0I3a+06d3Kob3rBfw+fA+g9rPHoV +4y3nro0FpzqmAuSgmdtUuqV7DOUlF+Rbo6EDw2sirTACCNg8gWFS47ITQBsX99XDDGc2+ jsmCpwjR+H9uMNd6dtvHcHjIOmJYT8/Q5gGDdp93URvNDckDsAtXej6h+FeGt1GCgucOx/ KUKbJDMttAQNKz++Zk3uY9MyanUkMum2O/CoRFI769AAQiZ6hwLv7kwxk2PHadWI/v58c8 B4lipdAVQhy0LALtjljGOmNGEq2Lq/QoI9NRe9Z1/rms3TKpRZgluyjkKUpqAw== 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 4TXGcc2TnLzNvG; Sat, 10 Feb 2024 16:38:24 +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 41AGcOfG050106; Sat, 10 Feb 2024 16:38:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41AGcOaV050103; Sat, 10 Feb 2024 16:38:24 GMT (envelope-from git) Date: Sat, 10 Feb 2024 16:38:24 GMT Message-Id: <202402101638.41AGcOaV050103@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: f82e98237395 - main - Fix subr_uio.c style(9) with uses of sizeof. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: f82e98237395693d1825243ff7b111aa321d383f Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f82e98237395693d1825243ff7b111aa321d383f commit f82e98237395693d1825243ff7b111aa321d383f Author: Alfredo Mazzinghi AuthorDate: 2024-01-17 17:23:58 +0000 Commit: Mark Johnston CommitDate: 2024-02-10 16:37:57 +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 --- 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 1badf4c48fe2..e7c7de406d47 100644 --- a/sys/kern/subr_uio.c +++ b/sys/kern/subr_uio.c @@ -351,7 +351,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) { @@ -372,8 +372,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) { @@ -403,8 +403,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);