valgrind complains that epoll_ctl() uses an epoll_event in which we
have only set the part we use from the data field (i.e. the fd). Tests
show that pre-initializing the struct in the stack doesn't have a
measurable impact so let's do it.
static void _update_fd(int fd)
{
int en, opcode;
- struct epoll_event ev;
+ struct epoll_event ev = { };
en = fdtab[fd].state;
}
/* construct the epoll events based on new state */
- ev.events = 0;
if (en & FD_EV_ACTIVE_R)
ev.events |= EPOLLIN | EPOLLRDHUP;