static int fdevent_linux_sysepoll_event_get_revent(fdevents *ev, size_t ndx)
{
int events = 0, e;
e = ev->epoll_events[ndx].events;
if (e & EPOLLIN) events |= FDEVENT_IN;
if (e & EPOLLOUT) events |= FDEVENT_OUT;
if (e & EPOLLERR) events |= FDEVENT_ERR;
if (e & EPOLLHUP) events |= FDEVENT_HUP;
if (e & EPOLLPRI) events |= FDEVENT_PRI;
return e;
}
函数实现EPOLL自带事件到自定义封装事件的转换, 最后返回自定义事件集; 但函数最后却是返回e,应该返回events。