zos: initialize pollfd revents
If not initialized to zero, revents could carry dirty bits in the output from poll. PR-URL: https://github.com/libuv/libuv/pull/1820 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
13ba902cf3
commit
5f5d19d906
@ -215,6 +215,7 @@ uv__os390_epoll* epoll_create1(int flags) {
|
||||
maybe_resize(lst, 1);
|
||||
lst->items[lst->size - 1].fd = lst->msg_queue;
|
||||
lst->items[lst->size - 1].events = POLLIN;
|
||||
lst->items[lst->size - 1].revents = 0;
|
||||
uv_once(&once, epoll_init);
|
||||
uv_mutex_lock(&global_epoll_lock);
|
||||
QUEUE_INSERT_TAIL(&global_epoll_queue, &lst->member);
|
||||
@ -252,6 +253,7 @@ int epoll_ctl(uv__os390_epoll* lst,
|
||||
}
|
||||
lst->items[fd].fd = fd;
|
||||
lst->items[fd].events = event->events;
|
||||
lst->items[fd].revents = 0;
|
||||
} else if (op == EPOLL_CTL_MOD) {
|
||||
if (fd >= lst->size || lst->items[fd].fd == -1) {
|
||||
uv_mutex_unlock(&global_epoll_lock);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user