diff --git a/lib/poll.c b/lib/poll.c index 803ac0e..ac38658 100644 --- a/lib/poll.c +++ b/lib/poll.c @@ -336,11 +336,6 @@ poll (struct pollfd *pfd, nfds_t nfd, int timeout) int maxfd, rc; nfds_t i; - if (nfd > TYPE_MAXIMUM (nfds_t) / 2) - { - errno = EINVAL; - return -1; - } /* Don't check directly for NFD too large. Any practical use of a too-large NFD is caught by one of the other checks below, and checking directly for getdtablesize is too much of a portability @@ -434,7 +429,7 @@ poll (struct pollfd *pfd, nfds_t nfd, int timeout) int rc = 0; nfds_t i; - if (nfd < 0 || timeout < -1) + if (timeout < -1) { errno = EINVAL; return -1;