diff options
author | 1998-08-05 16:05:16 +0000 | |
---|---|---|
committer | 1998-08-05 16:05:16 +0000 | |
commit | 4d2e18f83a4369e911849e71aa0e106fe2cc7420 (patch) | |
tree | 4f0cdaf2226c64be1574a6b7939dda23803ab2e8 | |
parent | 12 seconds not 30. But I am just about to remove the kill and wait (diff) | |
download | wireguard-openbsd-4d2e18f83a4369e911849e71aa0e106fe2cc7420.tar.xz wireguard-openbsd-4d2e18f83a4369e911849e71aa0e106fe2cc7420.zip |
delete bogus casts of msg_iovlen to u_int since msg_iovlen is already a u_int
-rw-r--r-- | sys/compat/common/uipc_syscalls_43.c | 16 | ||||
-rw-r--r-- | sys/kern/uipc_syscalls.c | 16 |
2 files changed, 14 insertions, 18 deletions
diff --git a/sys/compat/common/uipc_syscalls_43.c b/sys/compat/common/uipc_syscalls_43.c index 6263b4e6b5e..4388af383e0 100644 --- a/sys/compat/common/uipc_syscalls_43.c +++ b/sys/compat/common/uipc_syscalls_43.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_syscalls_43.c,v 1.3 1996/04/18 21:21:36 niklas Exp $ */ +/* $OpenBSD: uipc_syscalls_43.c,v 1.4 1998/08/05 16:05:16 millert Exp $ */ /* $NetBSD: uipc_syscalls_43.c,v 1.5 1996/03/14 19:31:50 christos Exp $ */ /* @@ -219,12 +219,11 @@ compat_43_sys_recvmsg(p, v, retval) sizeof (struct omsghdr)); if (error) return (error); - if ((u_int)msg.msg_iovlen >= UIO_SMALLIOV) { - if ((u_int)msg.msg_iovlen >= UIO_MAXIOV) + if (msg.msg_iovlen >= UIO_SMALLIOV) { + if (msg.msg_iovlen >= UIO_MAXIOV) return (EMSGSIZE); MALLOC(iov, struct iovec *, - sizeof(struct iovec) * (u_int)msg.msg_iovlen, M_IOV, - M_WAITOK); + sizeof(struct iovec) * msg.msg_iovlen, M_IOV, M_WAITOK); } else iov = aiov; msg.msg_flags = SCARG(uap, flags) | MSG_COMPAT; @@ -292,12 +291,11 @@ compat_43_sys_sendmsg(p, v, retval) sizeof (struct omsghdr)); if (error) return (error); - if ((u_int)msg.msg_iovlen >= UIO_SMALLIOV) { - if ((u_int)msg.msg_iovlen >= UIO_MAXIOV) + if (msg.msg_iovlen >= UIO_SMALLIOV) { + if (msg.msg_iovlen >= UIO_MAXIOV) return (EMSGSIZE); MALLOC(iov, struct iovec *, - sizeof(struct iovec) * (u_int)msg.msg_iovlen, M_IOV, - M_WAITOK); + sizeof(struct iovec) * msg.msg_iovlen, M_IOV, M_WAITOK); } else iov = aiov; error = copyin((caddr_t)msg.msg_iov, (caddr_t)iov, diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 8470e9fb5fe..0825988e79e 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_syscalls.c,v 1.10 1998/07/28 19:47:08 millert Exp $ */ +/* $OpenBSD: uipc_syscalls.c,v 1.11 1998/08/05 16:05:18 millert Exp $ */ /* $NetBSD: uipc_syscalls.c,v 1.19 1996/02/09 19:00:48 christos Exp $ */ /* @@ -387,12 +387,11 @@ sys_sendmsg(p, v, retval) return (error); if (msg.msg_iovlen <= 0) return (EINVAL); - if ((u_int)msg.msg_iovlen >= UIO_SMALLIOV) { - if ((u_int)msg.msg_iovlen >= UIO_MAXIOV) + if (msg.msg_iovlen >= UIO_SMALLIOV) { + if (msg.msg_iovlen >= UIO_MAXIOV) return (EMSGSIZE); MALLOC(iov, struct iovec *, - sizeof(struct iovec) * (u_int)msg.msg_iovlen, M_IOV, - M_WAITOK); + sizeof(struct iovec) * msg.msg_iovlen, M_IOV, M_WAITOK); } else iov = aiov; if (msg.msg_iovlen && @@ -573,12 +572,11 @@ sys_recvmsg(p, v, retval) return (error); if (msg.msg_iovlen <= 0) return (EINVAL); - if ((u_int)msg.msg_iovlen >= UIO_SMALLIOV) { - if ((u_int)msg.msg_iovlen >= UIO_MAXIOV) + if (msg.msg_iovlen >= UIO_SMALLIOV) { + if (msg.msg_iovlen >= UIO_MAXIOV) return (EMSGSIZE); MALLOC(iov, struct iovec *, - sizeof(struct iovec) * (u_int)msg.msg_iovlen, M_IOV, - M_WAITOK); + sizeof(struct iovec) * msg.msg_iovlen, M_IOV, M_WAITOK); } else iov = aiov; #ifdef COMPAT_OLDSOCK |