diff options
author | glebius <glebius@FreeBSD.org> | 2013-04-19 13:40:13 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2013-04-19 13:40:13 +0000 |
commit | b991db2beb3c9980e40aa333fe932ba017cf75fd (patch) | |
tree | 0c63239b3387bd82f82de082a18f3d2baf6c0b63 /sys/kern | |
parent | be7967ddcc79e167b9d131caefef8bed980385af (diff) | |
download | FreeBSD-src-b991db2beb3c9980e40aa333fe932ba017cf75fd.zip FreeBSD-src-b991db2beb3c9980e40aa333fe932ba017cf75fd.tar.gz |
Don't compare unsigned socklen_t against < 0.
Reviewed by: jhb
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/uipc_syscalls.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 3ee48c8..ac2fd42 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -382,11 +382,8 @@ kern_accept(struct thread *td, int s, struct sockaddr **name, pid_t pgid; int tmp; - if (name) { + if (name) *name = NULL; - if (*namelen < 0) - return (EINVAL); - } AUDIT_ARG_FD(s); fdp = td->td_proc->p_fd; @@ -1565,9 +1562,6 @@ kern_getsockname(struct thread *td, int fd, struct sockaddr **sa, socklen_t len; int error; - if (*alen < 0) - return (EINVAL); - AUDIT_ARG_FD(fd); error = getsock_cap(td->td_proc->p_fd, fd, CAP_GETSOCKNAME, &fp, NULL); if (error) @@ -1665,9 +1659,6 @@ kern_getpeername(struct thread *td, int fd, struct sockaddr **sa, socklen_t len; int error; - if (*alen < 0) - return (EINVAL); - AUDIT_ARG_FD(fd); error = getsock_cap(td->td_proc->p_fd, fd, CAP_GETPEERNAME, &fp, NULL); if (error) |