From: Lennart Poettering Date: Wed, 24 Jan 2018 18:52:29 +0000 (+0100) Subject: manager: minor manager_get_show_status() simplification X-Git-Tag: v237~28^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=46fb617bf94a202c74e753407f28d59bec1339f7;p=platform%2Fupstream%2Fsystemd.git 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". --- diff --git a/src/core/manager.c b/src/core/manager.c index f764fb5..b58f345 100644 --- 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) {