From: Lennart Poettering Date: Fri, 26 Jul 2019 07:04:15 +0000 (+0200) Subject: sysctl: reset 'r' only where needed X-Git-Tag: v243~149^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2de30233f7a6b582aa25e186daa9007c4ad8ef8d;p=platform%2Fupstream%2Fsystemd.git sysctl: reset 'r' only where needed --- diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c index eeefc8b..f601ae5 100644 --- a/src/sysctl/sysctl.c +++ b/src/sysctl/sysctl.c @@ -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)