mirror of
https://github.com/libevent/libevent.git
synced 2025-01-20 05:02:55 +08:00
Merge pull request #30 from ppelleti/valgrind-epoll
avoid valgrind false positive by zeroing epoll_event
This commit is contained in:
commit
19583a5ffe
1
epoll.c
1
epoll.c
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user