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:
parent
81082f2dc2
commit
060e2512cd
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user