X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/64f36a5836c8c375247ca0623712a35f80c6cfb2..1751139117cc37f17051fdc55c0fe00c5da2043d:/ae_epoll.c?ds=sidebyside diff --git a/ae_epoll.c b/ae_epoll.c index b63b74b5..8fb5d4c3 100644 --- a/ae_epoll.c +++ b/ae_epoll.c @@ -36,6 +36,7 @@ static int aeApiAddEvent(aeEventLoop *eventLoop, int fd, int mask) { if (mask & AE_READABLE) ee.events |= EPOLLIN; if (mask & AE_WRITABLE) ee.events |= EPOLLOUT; if (mask & AE_EXCEPTION) ee.events |= EPOLLPRI; + ee.data.u64 = 0; /* avoid valgrind warning */ ee.data.fd = fd; if (epoll_ctl(state->epfd,op,fd,&ee) == -1) return -1; return 0; @@ -50,6 +51,7 @@ static void aeApiDelEvent(aeEventLoop *eventLoop, int fd, int delmask) { if (mask & AE_READABLE) ee.events |= EPOLLIN; if (mask & AE_WRITABLE) ee.events |= EPOLLOUT; if (mask & AE_EXCEPTION) ee.events |= EPOLLPRI; + ee.data.u64 = 0; /* avoid valgrind warning */ ee.data.fd = fd; if (mask != AE_NONE) { epoll_ctl(state->epfd,EPOLL_CTL_MOD,fd,&ee);