summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/receiver.c2
-rw-r--r--lib/utils.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/receiver.c b/lib/receiver.c
index 9c21063..9b34494 100644
--- a/lib/receiver.c
+++ b/lib/receiver.c
@@ -55,7 +55,7 @@ static void socket_event_received(EpollThread *t, int fd, void *data) {
socklen_t addr_size = sizeof(self->addr);
int sender_fd = accept4(fd, (struct sockaddr *)&self->addr, &addr_size,
SOCK_CLOEXEC | SOCK_NONBLOCK);
- struct epoll_event event;
+ struct epoll_event event = {0};
event.events = EPOLLIN;
event.data.fd = sender_fd;
epoll_ctl(t->epoll_fd, EPOLL_CTL_ADD, sender_fd, &event);
diff --git a/lib/utils.c b/lib/utils.c
index 37bcce9..d66bc78 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -199,7 +199,7 @@ bool icipc_epoll_thread_init(
icipc_epoll_thread_event_func_t sock_func,
icipc_epoll_thread_event_func_t other_func,
void *data) {
- struct epoll_event event;
+ struct epoll_event event = {0};
self->socket_fd = socket_fd;
self->event_fd = -1;