From: Yu Watanabe Date: Wed, 27 Oct 2021 14:22:12 +0000 (+0900) Subject: systemctl: drop redundant "else" X-Git-Tag: v250-rc1~402 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ab5d52b79d89eda574764a747eaf66dcc5fe316c;p=thirdparty%2Fsystemd.git systemctl: drop redundant "else" --- diff --git a/src/systemctl/systemctl-show.c b/src/systemctl/systemctl-show.c index 44460878601..7e4432d3240 100644 --- a/src/systemctl/systemctl-show.c +++ b/src/systemctl/systemctl-show.c @@ -89,7 +89,7 @@ static int exec_status_info_deserialize(sd_bus_message *m, ExecStatusInfo *i, bo r = sd_bus_message_enter_container(m, SD_BUS_TYPE_STRUCT, is_ex_prop ? "sasasttttuii" : "sasbttttuii"); if (r < 0) return bus_log_parse_error(r); - else if (r == 0) + if (r == 0) return 0; r = sd_bus_message_read(m, "s", &path); @@ -1944,7 +1944,7 @@ static int show_one( if (show_mode == SYSTEMCTL_SHOW_STATUS) return EXIT_PROGRAM_OR_SERVICES_STATUS_UNKNOWN; - else if (show_mode == SYSTEMCTL_SHOW_HELP) + if (show_mode == SYSTEMCTL_SHOW_HELP) return -ENOENT; } @@ -2037,7 +2037,7 @@ static int show_all( r = show_one(bus, p, u->id, SYSTEMCTL_SHOW_STATUS, new_line, ellipsized); if (r < 0) return r; - else if (r > 0 && ret == 0) + if (r > 0 && ret == 0) ret = r; } @@ -2177,7 +2177,7 @@ int show(int argc, char *argv[], void *userdata) { r = show_one(bus, path, unit, show_mode, &new_line, &ellipsized); if (r < 0) return r; - else if (r > 0 && ret == 0) + if (r > 0 && ret == 0) ret = r; }