From: Jaroslav Kysela Date: Wed, 10 Jan 2018 11:30:19 +0000 (+0100) Subject: tvhpoll: tiny optimization in tvhpoll_add0 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ddfd4dd81a8b9aa4003f50b2ce8ea7dca1035f13;p=thirdparty%2Ftvheadend.git tvhpoll: tiny optimization in tvhpoll_add0 --- diff --git a/src/tvhpoll.c b/src/tvhpoll.c index 08c1b6a1d..c78e84e7f 100644 --- a/src/tvhpoll.c +++ b/src/tvhpoll.c @@ -179,10 +179,10 @@ static int tvhpoll_add0 if (events & TVHPOLL_ERR) ev.events |= EPOLLERR; if (events & TVHPOLL_HUP) ev.events |= EPOLLHUP; if (oevents) { - if (epoll_ctl(tp->fd, EPOLL_CTL_MOD, evs[i].fd, &ev)) + if (epoll_ctl(tp->fd, EPOLL_CTL_MOD, fd, &ev)) break; } else { - if (epoll_ctl(tp->fd, EPOLL_CTL_ADD, evs[i].fd, &ev)) + if (epoll_ctl(tp->fd, EPOLL_CTL_ADD, fd, &ev)) break; } tvhpoll_set_events(tp, fd, events);