1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-03 05:18:09 +03:00

systemd-path: guarantee that tool exit status is zero on success

Let's not inherit the error code from an earlier function invocation.
This commit is contained in:
Lennart Poettering 2024-12-10 14:05:04 +01:00
parent 81082f2dc2
commit 060e2512cd

View File

@ -238,10 +238,11 @@ static int run(int argc, char* argv[]) {
if (r <= 0)
return r;
if (argc > optind)
if (argc > optind) {
r = 0;
for (int i = optind; i < argc; i++)
RET_GATHER(r, print_path(argv[i]));
else
} else
r = list_paths();
return r;