diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-10-27 23:22:12 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-10-28 04:52:06 +0900 |
commit | ab5d52b79d89eda574764a747eaf66dcc5fe316c (patch) | |
tree | 0ecb416ade938cf20faba521edbe4df7865f64ad /src/systemctl | |
parent | 266305484cfe1ce67ef784f41597a1f74f7a9e3a (diff) | |
download | systemd-ab5d52b79d89eda574764a747eaf66dcc5fe316c.tar.gz |
systemctl: drop redundant "else"
Diffstat (limited to 'src/systemctl')
-rw-r--r-- | src/systemctl/systemctl-show.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/systemctl/systemctl-show.c b/src/systemctl/systemctl-show.c index 4446087860..7e4432d324 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; } |