Skip to content

Commit

Permalink
avoid valgrind false positive by zeroing epoll_event
Browse files Browse the repository at this point in the history
  • Loading branch information
mignon-p committed Nov 17, 2012
1 parent 9dee36b commit 1258614
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions epoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1258614

Please sign in to comment.