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