path: simplify run()

No functional change, just less indents.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-02-11 11:47:18 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent e4c6ee2ce5
commit ff12bcd4fb
+4 -6
View File
@@ -250,13 +250,11 @@ static int run(int argc, char* argv[]) {
if (r <= 0)
return r;
if (argc > optind) {
r = 0;
for (int i = optind; i < argc; i++)
RET_GATHER(r, print_path(argv[i]));
} else
r = list_paths();
if (optind >= argc)
return list_paths();
for (int i = optind; i < argc; i++)
RET_GATHER(r, print_path(argv[i]));
return r;
}