diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-08-05 16:05:19 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-08-05 16:05:19 +0000 |
commit | 35d014194517b1ea2ec1f056f9eb2622dfad3543 (patch) | |
tree | 7fe3704052b273fcc8a03ee90315ef83e7b73231 /sys/kern | |
parent | b58bd74b823f695a95b58afeac7a236d8ab92661 (diff) |
delete bogus casts of msg_iovlen to u_int since msg_iovlen is already a u_int
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/uipc_syscalls.c | 16 |
1 files changed, 7 insertions, 9 deletions
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 |