diff options
author | Joachim Schmitz <jojo@schmitz-digital.de> | 2012-09-13 08:41:24 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-09-13 08:57:04 +0200 |
commit | c3d1ccfdb375b4cb1b912116c084a61422ef47e3 (patch) | |
tree | 3e890f479214937b0058820cb6e7dfad2e956672 /lib/poll.c | |
parent | 20a4d1d3860aa7bca90e1b51501084d5c33ee4f1 (diff) | |
download | gnulib-c3d1ccfdb375b4cb1b912116c084a61422ef47e3.tar.gz |
poll: fix poll(0, NULL, msec)
* lib/poll.c: don't exit early if NULL is the 1st arg to poll(),
but nfd is 0. In that case poll should behave like select.
Copyright-paperwork-exempt: yes
Diffstat (limited to 'lib/poll.c')
-rw-r--r-- | lib/poll.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/poll.c b/lib/poll.c index b696dee0d6..e50c4781fc 100644 --- a/lib/poll.c +++ b/lib/poll.c @@ -354,7 +354,7 @@ poll (struct pollfd *pfd, nfds_t nfd, int timeout) /* EFAULT is not necessary to implement, but let's do it in the simplest case. */ - if (!pfd) + if (!pfd && nfd) { errno = EFAULT; return -1; |