summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/replace/poll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/replace/poll.c b/lib/replace/poll.c
index 95b2f883bf..27876bb067 100644
--- a/lib/replace/poll.c
+++ b/lib/replace/poll.c
@@ -46,7 +46,7 @@ int rep_poll(struct pollfd *fds, nfds_t nfds, int timeout)
int rc;
nfds_t i;
- if (fds == NULL) {
+ if ((fds == NULL) && (nfds != 0)) {
errno = EFAULT;
return -1;
}