summaryrefslogtreecommitdiffstats
path: root/src/systemctl
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-01-14 15:01:55 +0100
committerLennart Poettering <lennart@poettering.net>2021-01-14 15:01:55 +0100
commitd5427dd29796a1ea464ed95e5ed3f0a0941ce01a (patch)
treec735dc195a3cd5f9b7032307dbb946dd515df4ab /src/systemctl
parentunit-file: downgrade log message to debug (diff)
downloadsystemd-d5427dd29796a1ea464ed95e5ed3f0a0941ce01a.tar.xz
systemd-d5427dd29796a1ea464ed95e5ed3f0a0941ce01a.zip
systemctl: properly initialize return params in all success cases
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl-util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systemctl/systemctl-util.c b/src/systemctl/systemctl-util.c
index 9713fce7af..aff247a881 100644
--- a/src/systemctl/systemctl-util.c
+++ b/src/systemctl/systemctl-util.c
@@ -477,7 +477,7 @@ int unit_find_paths(
return -ERFKILL;
if (streq(load_state, "not-found")) {
r = 0;
- goto not_found;
+ goto finish;
}
if (!STR_IN_SET(load_state, "loaded", "bad-setting"))
return -EKEYREJECTED;
@@ -534,6 +534,7 @@ int unit_find_paths(
}
}
+ finish:
if (isempty(path)) {
*ret_fragment_path = NULL;
r = 0;
@@ -550,7 +551,6 @@ int unit_find_paths(
*ret_dropin_paths = NULL;
}
- not_found:
if (r == 0 && !arg_force)
log_error("No files found for %s.", unit_name);