summaryrefslogtreecommitdiff
path: root/event-loop.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-07-29 15:01:01 -0400
committerKristian Høgsberg <krh@bitplanet.net>2010-07-29 15:01:01 -0400
commitfbd0fb0098f0f57f39eab7ecd71d6fb95ab141f1 (patch)
tree0be05930508a3068aab6401bc0ee462343d6dbdb /event-loop.c
parent8f2e67725efba16abe1558b6e3775b02545f110e (diff)
memset epoll event structs to quiet valgrind
Diffstat (limited to 'event-loop.c')
-rw-r--r--event-loop.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/event-loop.c b/event-loop.c
index 8568f40..11f5342 100644
--- a/event-loop.c
+++ b/event-loop.c
@@ -112,7 +112,7 @@ wl_event_loop_add_fd(struct wl_event_loop *loop,
source->func = func;
source->data = data;
- ep.events = 0;
+ memset(&ep, 0, sizeof ep);
if (mask & WL_EVENT_READABLE)
ep.events |= EPOLLIN;
if (mask & WL_EVENT_WRITEABLE)
@@ -135,7 +135,7 @@ wl_event_source_fd_update(struct wl_event_source *source, uint32_t mask)
struct wl_event_loop *loop = source->loop;
struct epoll_event ep;
- ep.events = 0;
+ memset(&ep, 0, sizeof ep);
if (mask & WL_EVENT_READABLE)
ep.events |= EPOLLIN;
if (mask & WL_EVENT_WRITEABLE)
@@ -210,6 +210,7 @@ wl_event_loop_add_timer(struct wl_event_loop *loop,
source->func = func;
source->data = data;
+ memset(&ep, 0, sizeof ep);
ep.events = EPOLLIN;
ep.data.ptr = source;
@@ -310,6 +311,7 @@ wl_event_loop_add_signal(struct wl_event_loop *loop,
source->func = func;
source->data = data;
+ memset(&ep, 0, sizeof ep);
ep.events = EPOLLIN;
ep.data.ptr = source;