Merge pull request #30 from ppelleti/valgrind-epoll

avoid valgrind false positive by zeroing epoll_event
This commit is contained in:
Nick Mathewson 2013-02-04 13:50:58 -08:00
commit 19583a5ffe

View File

@ -182,6 +182,7 @@ epoll_init(struct event_base *base)
fd = epollop->timerfd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK|TFD_CLOEXEC);
if (epollop->timerfd >= 0) {
struct epoll_event epev;
memset(&epev, 0, sizeof(epev));
epev.data.fd = epollop->timerfd;
epev.events = EPOLLIN;
if (epoll_ctl(epollop->epfd, EPOLL_CTL_ADD, fd, &epev) < 0) {