chiark / gitweb /
bus: rename KDBUS_CMD_FNAME_POLICY_NONE -> KDBUS_CMD_FNAME_POLICY_OPEN
[elogind.git] / src / core / dbus.c
index 236ebc99d99804c5f1d7028c6dd31bf49403236d..67ab1ae7f70ba85bf8a3e134fa9433ff7a06d2b1 100644 (file)
@@ -203,13 +203,11 @@ static void bus_toggle_watch(DBusWatch *bus_watch, void *data) {
 }
 
 static int bus_timeout_arm(Manager *m, Watch *w) {
-        struct itimerspec its;
+        struct itimerspec its = {};
 
         assert(m);
         assert(w);
 
-        zero(its);
-
         if (dbus_timeout_get_enabled(w->data.bus_timeout)) {
                 timespec_store(&its.it_value, dbus_timeout_get_interval(w->data.bus_timeout) * USEC_PER_MSEC);
                 its.it_interval = its.it_value;
@@ -978,9 +976,8 @@ static DBusConnection* manager_bus_connect_private(Manager *m, DBusBusType type)
         }
 
         return connection;
+
 fail:
-        if (connection)
-                dbus_connection_close(connection);
         dbus_error_free(&error);
         return NULL;
 }
@@ -1054,7 +1051,7 @@ fail:
 static int bus_init_private(Manager *m) {
         DBusError error;
         int r;
-        const char *const external_only[] = {
+        static const char *const external_only[] = {
                 "EXTERNAL",
                 NULL
         };