summaryrefslogtreecommitdiff
path: root/lib/poll.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/poll.c')
-rw-r--r--lib/poll.c2
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;