summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2005-07-06 20:41:45 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2005-07-06 20:41:45 +0000
commitc22916e85b24ea566116c7aac1eb35d9a0eb1be4 (patch)
treeb0fb6ff3209eae2cae120512e225cedfc8d23655
parent8f6f44f69e6a11f684447acdbf67fc6444db97e7 (diff)
Eliminate a couple of 'msg.msg_iovlen < 0' tests. msg_iovlen is
unsigned. ok millert@ deraadt@
-rw-r--r--sys/kern/uipc_syscalls.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 41430a82df5..b4987772d50 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_syscalls.c,v 1.60 2004/07/22 06:13:08 tedu Exp $ */
+/* $OpenBSD: uipc_syscalls.c,v 1.61 2005/07/06 20:41:44 krw Exp $ */
/* $NetBSD: uipc_syscalls.c,v 1.19 1996/02/09 19:00:48 christos Exp $ */
/*
@@ -441,7 +441,7 @@ sys_sendmsg(p, v, retval)
error = copyin(SCARG(uap, msg), &msg, sizeof (msg));
if (error)
return (error);
- if (msg.msg_iovlen < 0 || msg.msg_iovlen > IOV_MAX)
+ if (msg.msg_iovlen > IOV_MAX)
return (EMSGSIZE);
if (msg.msg_iovlen > UIO_SMALLIOV)
iov = malloc(sizeof(struct iovec) * msg.msg_iovlen,
@@ -621,7 +621,7 @@ sys_recvmsg(p, v, retval)
error = copyin(SCARG(uap, msg), &msg, sizeof (msg));
if (error)
return (error);
- if (msg.msg_iovlen < 0 || msg.msg_iovlen > IOV_MAX)
+ if (msg.msg_iovlen > IOV_MAX)
return (EMSGSIZE);
if (msg.msg_iovlen > UIO_SMALLIOV)
iov = malloc(sizeof(struct iovec) * msg.msg_iovlen,