logind: minor cleanup and use IN_SET() in manager_handle_action()

This commit is contained in:
Franck Bui
2016-06-08 18:18:50 +02:00
parent 8121f4d209
commit a1a8e4f5e9
+1 -1
View 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 &&