mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
minor fix to avoid a false valgrind warning.
This commit is contained in:
parent
7785121a50
commit
214d880b81
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user