chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dbb696e
)
logind: minor cleanup and use IN_SET() in manager_handle_action()
author
Franck Bui
<fbui@suse.com>
Wed, 8 Jun 2016 16:16:42 +0000
(18:16 +0200)
committer
Sven Eden
<yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:12:59 +0000
(10:12 +0200)
src/login/logind-action.c
patch
|
blob
|
history
diff --git
a/src/login/logind-action.c
b/src/login/logind-action.c
index 020815409724cf898a89cba22636ceaedfff9611..5b4a247b5c03b95d75421ecfdb06de5d613c0365 100644
(file)
--- a/
src/login/logind-action.c
+++ b/
src/login/logind-action.c
@@
-133,7
+133,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 &&