summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-10-07 16:27:55 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-10-07 16:27:55 +0900
commit1f57e71fabffd801d026c08e7acade834dcc16bb (patch)
treee24ff9e4f9099329f750c62503d808a97be272fa
parentMerge branch 'tg/memfixes' (diff)
parentpoll.c: always set revents, even if to zero (diff)
downloadtgif-1f57e71fabffd801d026c08e7acade834dcc16bb.tar.xz
Merge branch 'rb/compat-poll-fix'
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
-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;