summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFranck Bui <fbui@suse.com>2016-06-08 18:16:42 +0200
committerFranck Bui <fbui@suse.com>2016-06-08 18:18:50 +0200
commita1a8e4f5e9d87c386c630482dd288c0e354ff971 (patch)
tree7fc25712f7d19616a940e8c722fe47caf7e687bd /src
parent8121f4d209eca85dcb11830800483cdfafbef9b7 (diff)
logind: minor cleanup and use IN_SET() in manager_handle_action()
Diffstat (limited to 'src')
-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 &&