aboutsummaryrefslogtreecommitdiff
path: root/toys/pending
diff options
context:
space:
mode:
Diffstat (limited to 'toys/pending')
-rw-r--r--toys/pending/sh.c4
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;
}