chiark / gitweb /
logind: drop unused argument from method_do_shutdown_or_sleep()
authorDaniel Mack <daniel@zonque.org>
Thu, 9 Apr 2015 14:44:51 +0000 (16:44 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 06:54:25 +0000 (07:54 +0100)
src/login/logind-dbus.c

index 8c1748b..a6cc9be 100644 (file)
@@ -1526,7 +1526,6 @@ static int method_do_shutdown_or_sleep(
                 const char *action_multiple_sessions,
                 const char *action_ignore_inhibit,
                 const char *sleep_verb,
-                sd_bus_message_handler_t method,
                 sd_bus_error *error) {
 
         _cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL;
@@ -1541,7 +1540,6 @@ static int method_do_shutdown_or_sleep(
         assert(action);
         assert(action_multiple_sessions);
         assert(action_ignore_inhibit);
-        assert(method);
 
         r = sd_bus_message_read(message, "b", &interactive);
         if (r < 0)
@@ -1617,7 +1615,6 @@ static int method_poweroff(sd_bus *bus, sd_bus_message *message, void *userdata,
                         "org.freedesktop.login1.power-off-multiple-sessions",
                         "org.freedesktop.login1.power-off-ignore-inhibit",
                         NULL,
-                        method_poweroff,
                         error);
 }
 
@@ -1632,7 +1629,6 @@ static int method_reboot(sd_bus *bus, sd_bus_message *message, void *userdata, s
                         "org.freedesktop.login1.reboot-multiple-sessions",
                         "org.freedesktop.login1.reboot-ignore-inhibit",
                         NULL,
-                        method_reboot,
                         error);
 }
 
@@ -1647,7 +1643,6 @@ static int method_suspend(sd_bus *bus, sd_bus_message *message, void *userdata,
                         "org.freedesktop.login1.suspend-multiple-sessions",
                         "org.freedesktop.login1.suspend-ignore-inhibit",
                         "suspend",
-                        method_suspend,
                         error);
 }
 
@@ -1662,7 +1657,6 @@ static int method_hibernate(sd_bus *bus, sd_bus_message *message, void *userdata
                         "org.freedesktop.login1.hibernate-multiple-sessions",
                         "org.freedesktop.login1.hibernate-ignore-inhibit",
                         "hibernate",
-                        method_hibernate,
                         error);
 }
 
@@ -1677,7 +1671,6 @@ static int method_hybrid_sleep(sd_bus *bus, sd_bus_message *message, void *userd
                         "org.freedesktop.login1.hibernate-multiple-sessions",
                         "org.freedesktop.login1.hibernate-ignore-inhibit",
                         "hybrid-sleep",
-                        method_hybrid_sleep,
                         error);
 }