From 46fb617bf94a202c74e753407f28d59bec1339f7 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 24 Jan 2018 19:52:29 +0100 Subject: [PATCH] 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". --- src/core/manager.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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) { -- 2.7.4