diff options
| author | Rob Landley <rob@landley.net> | 2020-05-05 00:06:42 -0500 | 
|---|---|---|
| committer | Rob Landley <rob@landley.net> | 2020-05-05 00:06:42 -0500 | 
| commit | e26b8368a94163148fc3c94a346151e22cede10c (patch) | |
| tree | 7f062749fb9b24cd857dabf20617f36ef51482aa | |
| parent | 81c1aa3c1d67f7645fda9dddf668321beae302e6 (diff) | |
| download | toybox-e26b8368a94163148fc3c94a346151e22cede10c.tar.gz | |
Remove leftover increment and move variable clear after error report.
| -rw-r--r-- | toys/pending/sh.c | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/toys/pending/sh.c b/toys/pending/sh.c index 79509084..4abe6579 100644 --- a/toys/pending/sh.c +++ b/toys/pending/sh.c @@ -1666,7 +1666,7 @@ static int parse_line(char *line, struct sh_function *sp)        arg += 1+pl->here;        // Match unquoted EOF. -      for (s = line, end = arg->v[arg->c]; *s && *end; s++, i++) { +      for (s = line, end = arg->v[arg->c]; *s && *end; s++) {          s += strspn(s, "\\\"'");          if (*s != *end) break;        } @@ -2780,10 +2780,10 @@ void exec_main(void)    if (TT.exec.a || FLAG(l))      *toys.optargs = xmprintf("%s%s", FLAG(l) ? "-" : "", TT.exec.a?:TT.isexec);    sh_exec(toys.optargs); -  TT.isexec = 0;    // report error (usually ENOENT) and return    perror_msg("%s", TT.isexec); +  TT.isexec = 0;    toys.exitval = 127;    environ = old;  } | 
