goto error;
}
- struct epoll_event event = { 0 };
+ struct epoll_event event;
+ memset(&event, 0, sizeof(event));
event.events = EPOLLIN;
event.data.ptr = NULL;
if (epoll_ctl(ret->epoll_fd, EPOLL_CTL_ADD, ret->event_fd, &event) == -1) {
object->write_ready = write_ready;
pthread_mutex_init(&object->lock, NULL);
- struct epoll_event event = { 0 };
- event.events = 0;
+ struct epoll_event event;
+ memset(&event, 0, sizeof(event));
if (read_ready)
event.events |= (EPOLLIN | EPOLLRDHUP);
if (write_ready)
void (*write_ready)(void *context)) {
assert(object != NULL);
- struct epoll_event event = { 0 };
- event.events = 0;
+ struct epoll_event event;
+ memset(&event, 0, sizeof(event));
if (read_ready)
event.events |= (EPOLLIN | EPOLLRDHUP);
if (write_ready)