chiark / gitweb /
Prep v239: Only _HANDLE_ACTION_INVALID makes method_can_shutdown_or_sleep() answer...
[elogind.git] / src / login / logind-dbus.c
index 63a206ce2c113d8783ce3f3d7adf587e3d734f94..e75fb023b2de7fb456d14a4cb07e3e75185c2eb9 100644 (file)
@@ -2385,7 +2385,7 @@ static int method_can_shutdown_or_sleep(
                         }
                 }
 #else
-                if ( (handle <= HANDLE_IGNORE) || (handle >= _HANDLE_ACTION_MAX) ) {
+                if ( _HANDLE_ACTION_INVALID == handle ) {
                         result = "no";
                         goto finish;
         }
@@ -2434,7 +2434,6 @@ static int method_can_shutdown_or_sleep(
         }
 
  finish:
-
         return sd_bus_reply_method_return(message, "s", result);
 }