summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-10-18 14:19:05 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-10-18 14:19:05 +0900
commit96d4b17bd6610275c3ae9d810f1557abaf168a23 (patch)
tree0d0cee5f20910807eb52599726fc1bc25135d20b /compat
parentMerge branch 'tg/memfixes' into maint (diff)
parentpoll.c: always set revents, even if to zero (diff)
downloadtgif-96d4b17bd6610275c3ae9d810f1557abaf168a23.tar.xz
Merge branch 'rb/compat-poll-fix' into maint
Backports a moral equivalent of 2015 fix to the poll emulation from the upstream gnulib to fix occasional breakages on HPE NonStop. * rb/compat-poll-fix: poll.c: always set revents, even if to zero
Diffstat (limited to 'compat')
-rw-r--r--compat/poll/poll.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/compat/poll/poll.c b/compat/poll/poll.c
index b10adc780f..ae03b74a6f 100644
--- a/compat/poll/poll.c
+++ b/compat/poll/poll.c
@@ -438,6 +438,10 @@ poll (struct pollfd *pfd, nfds_t nfd, int timeout)
pfd[i].revents = happened;
rc++;
}
+ else
+ {
+ pfd[i].revents = 0;
+ }
}
return rc;