git: f82e98237395 - main - Fix subr_uio.c style(9) with uses of sizeof.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 10 Feb 2024 16:38:24 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f82e98237395693d1825243ff7b111aa321d383f commit f82e98237395693d1825243ff7b111aa321d383f Author: Alfredo Mazzinghi <am2419@cl.cam.ac.uk> AuthorDate: 2024-01-17 17:23:58 +0000 Commit: Mark Johnston <markj@FreeBSD.org> 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);