projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a69973
)
manager: minor manager_get_show_status() simplification
author
Lennart Poettering
<lennart@poettering.net>
Wed, 24 Jan 2018 18:52:29 +0000
(19:52 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 24 Jan 2018 18:52:29 +0000
(19:52 +0100)
Since the the whole function ultimately is just a fancy getter for the
show_status field, let's actually return it as last step literally
without an extra needless "if".
src/core/manager.c
patch
|
blob
|
history
diff --git
a/src/core/manager.c
b/src/core/manager.c
index
f764fb5
..
b58f345
100644
(file)
--- a/
src/core/manager.c
+++ b/
src/core/manager.c
@@
-3548,10
+3548,7
@@
static bool manager_get_show_status(Manager *m, StatusType type) {
if (type != STATUS_TYPE_EMERGENCY && manager_check_ask_password(m) > 0)
return false;
- if (m->show_status > 0)
- return true;
-
- return false;
+ return m->show_status > 0;
}
const char *manager_get_confirm_spawn(Manager *m) {