]> Savannah Git Hosting - gnulib.git/commit
poll: fixes for large fds
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 20 Feb 2015 18:37:49 +0000 (10:37 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 20 Feb 2015 18:54:03 +0000 (10:54 -0800)
commitd42461c38d239087e6579ac357b3119b32dbfe2e
tree5e9fb4ae9943a5b1946fd82aaae4cba3b2acc86f
parent119aeef6c7a304936ee00542ea32332cfaa48722
poll: fixes for large fds

* lib/poll.c (poll): Don't check directly for NFD too large.
Don't rely on undefined behavior in FD_SET when an arg exceeds
FD_SETSIZE.  Always set revents afterwards, even if to zero.
* tests/test-poll.c (poll1): Set revents to -1 instead of 0,
as that makes the test a bit stricter.
ChangeLog
lib/poll.c
tests/test-poll.c