]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
logind: minor cleanup and use IN_SET() in manager_handle_action() 3470/head
authorFranck Bui <fbui@suse.com>
Wed, 8 Jun 2016 16:16:42 +0000 (18:16 +0200)
committerFranck Bui <fbui@suse.com>
Wed, 8 Jun 2016 16:18:50 +0000 (18:18 +0200)
src/login/logind-action.c

index 95a2a011732e28e5ed1e34df62c24279119f4cc5..8ef48dbaa16538e0fa40f87b3c5b75894bc17cdf 100644 (file)
@@ -124,7 +124,7 @@ int manager_handle_action(
                 return -EALREADY;
         }
 
-        inhibit_operation = handle == HANDLE_SUSPEND || handle == HANDLE_HIBERNATE || handle == HANDLE_HYBRID_SLEEP ? INHIBIT_SLEEP : INHIBIT_SHUTDOWN;
+        inhibit_operation = IN_SET(handle, HANDLE_SUSPEND, HANDLE_HIBERNATE, HANDLE_HYBRID_SLEEP) ? INHIBIT_SLEEP : INHIBIT_SHUTDOWN;
 
         /* If the actual operation is inhibited, warn and fail */
         if (!ignore_inhibited &&