manager: minor manager_get_show_status() simplification

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".
This commit is contained in:
Lennart Poettering 2018-01-24 19:52:29 +01:00
parent 5a69973ff2
commit 46fb617bf9
1 changed files with 1 additions and 4 deletions

View File

@ -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) {