Permalink
Browse files

avoid valgrind false positive by zeroing epoll_event

  • Loading branch information...
1 parent 9dee36b commit 1258614f2c42ecc2478e56e39329585f8e0c61d5 @ppelleti ppelleti committed Nov 17, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 epoll.c
View
@@ -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) {

0 comments on commit 1258614

Please sign in to comment.