summaryrefslogtreecommitdiff
path: root/src/login/logind-action.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/logind-action.c')
-rw-r--r--src/login/logind-action.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/login/logind-action.c b/src/login/logind-action.c
index 95a2a01173..8ef48dbaa1 100644
--- a/src/login/logind-action.c
+++ b/src/login/logind-action.c
@@ -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 &&