chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
disable the cgroups release agent when shutting down
[elogind.git]
/
src
/
shared
/
dbus-loop.c
diff --git
a/src/shared/dbus-loop.c
b/src/shared/dbus-loop.c
index b42ae14511764222d03cee871d4f7226b8a90545..c5332422202955fb9c45d20d9bd7d7a5c9b79d3b 100644
(file)
--- a/
src/shared/dbus-loop.c
+++ b/
src/shared/dbus-loop.c
@@
-44,8
+44,8
@@
typedef struct EpollData {
} EpollData;
static dbus_bool_t add_watch(DBusWatch *watch, void *data) {
} EpollData;
static dbus_bool_t add_watch(DBusWatch *watch, void *data) {
-
EpollData _cleanup_free_
*e = NULL;
- struct epoll_event ev = {
.data.ptr = e
};
+
_cleanup_free_ EpollData
*e = NULL;
+ struct epoll_event ev = {};
assert(watch);
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);
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) {
if (epoll_ctl(PTR_TO_INT(data), EPOLL_CTL_ADD, e->fd, &ev) < 0) {
@@
-88,7
+89,7
@@
static dbus_bool_t add_watch(DBusWatch *watch, void *data) {
}
static void remove_watch(DBusWatch *watch, void *data) {
}
static void remove_watch(DBusWatch *watch, void *data) {
-
EpollData _cleanup_free_
*e = NULL;
+
_cleanup_free_ EpollData
*e = NULL;
assert(watch);
assert(watch);
@@
-174,7
+175,7
@@
fail:
}
static void remove_timeout(DBusTimeout *timeout, void *data) {
}
static void remove_timeout(DBusTimeout *timeout, void *data) {
-
EpollData _cleanup_free_
*e = NULL;
+
_cleanup_free_ EpollData
*e = NULL;
assert(timeout);
assert(timeout);