Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

minor fix to avoid a false valgrind warning.

  • Loading branch information...
commit 214d880b815242fa419aa3a39411d42025566521 1 parent 7785121
@antirez authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  ae_epoll.c
View
2  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);
Please sign in to comment.
Something went wrong with that request. Please try again.