summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-04-06 02:56:04 +0200
committerKay Sievers <kay@vrfy.org>2013-04-06 02:56:04 +0200
commit2f9f5aa014bda3b52ae388a7283e0fd50d4621c3 (patch)
tree943f094c1286f0f9be1647f2648e973e160ae811 /src
parent245802dd89ccf10de446faff5577e041d5372062 (diff)
dbus-loop.c: fix variable initialization
Fix for: b92bea5d2a9481de69bb627a7b442a9f58fca43d Causing: systemd-logind[265]: Assertion 'd = event.data.ptr' failed at src/shared/dbus-loop.c:233, function bus_loop_dispatch(). Aborting.
Diffstat (limited to 'src')
-rw-r--r--src/shared/dbus-loop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/dbus-loop.c b/src/shared/dbus-loop.c
index b42ae14511..fadbd43958 100644
--- a/src/shared/dbus-loop.c
+++ b/src/shared/dbus-loop.c
@@ -45,7 +45,7 @@ typedef struct EpollData {
static dbus_bool_t add_watch(DBusWatch *watch, void *data) {
EpollData _cleanup_free_ *e = NULL;
- struct epoll_event ev = { .data.ptr = e };
+ struct epoll_event ev = {};
assert(watch);
@@ -58,6 +58,7 @@ static dbus_bool_t add_watch(DBusWatch *watch, void *data) {
e->is_timeout = false;
ev.events = bus_flags_to_events(watch);
+ ev.data.ptr = e;
if (epoll_ctl(PTR_TO_INT(data), EPOLL_CTL_ADD, e->fd, &ev) < 0) {