sysctl: reset 'r' only where needed

This commit is contained in:
Lennart Poettering 2019-07-26 09:04:15 +02:00
parent 8a65188437
commit 2de30233f7

View file

@ -279,11 +279,11 @@ static int run(int argc, char *argv[]) {
if (!sysctl_options)
return log_oom();
r = 0;
if (argc > optind) {
int i;
r = 0;
for (i = optind; i < argc; i++) {
k = parse_file(sysctl_options, argv[i], false);
if (k < 0 && r == 0)