summaryrefslogtreecommitdiff
path: root/epoll.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-09-30 23:15:47 -0400
committerNick Mathewson <nickm@torproject.org>2010-09-30 23:15:47 -0400
commit0faaee016583a46006b46c5c2c82440dad1aefb8 (patch)
tree7e768dea6e41284c57bea545252e05190b09817b /epoll.c
parenta8b7674cd5e3636ce36aef9dc1a0cdb4bd3584f2 (diff)
downloadlibevent-0faaee016583a46006b46c5c2c82440dad1aefb8.tar.gz
Fix a spurious-call bug on epoll.c
We were trying to check whether any events had really been notified on an fd before calling evmap_io_active on it, but instead we were checking for an event pointer, which was always true. In practice, this patch shouldn't change much, since epoll_wait shouldn't return an event unless there is actually an event going on. Spotted by an anonymous bug reporter on Sourceforge. Closes bug 3078425.
Diffstat (limited to 'epoll.c')
-rw-r--r--epoll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epoll.c b/epoll.c
index 4f4a512c..b574bf4d 100644
--- a/epoll.c
+++ b/epoll.c
@@ -349,7 +349,7 @@ epoll_dispatch(struct event_base *base, struct timeval *tv)
ev |= EV_WRITE;
}
- if (!events)
+ if (!ev)
continue;
evmap_io_active(base, events[i].data.fd, ev | EV_ET);