[git commit] ash: change "clear ungetc counter on syntax errors" fix to match dash
Denys Vlasenko
vda.linux at googlemail.com
Wed Dec 23 23:22:24 UTC 2020
commit: https://git.busybox.net/busybox/commit/?id=51a471d05d637e928ed26b0240645ff3e51ef396
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
function old new delta
ash_main 1203 1210 +7
raise_exception 39 26 -13
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 7/-13) Total: -6 bytes
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
shell/ash.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/shell/ash.c b/shell/ash.c
index aa2a93bca..f16d7fb6a 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -636,8 +636,6 @@ raise_exception(int e)
abort();
#endif
INT_OFF;
- /* Prevent this: ";l" -> syntax error, then "s" -> runs "ls" */
- g_parsefile->unget = 0;
exception_type = e;
longjmp(exception_handler->loc, 1);
}
@@ -14161,6 +14159,7 @@ reset(void)
/* from input.c: */
g_parsefile->left_in_buffer = 0;
g_parsefile->left_in_line = 0; /* clear input buffer */
+ g_parsefile->unget = 0;
popallfiles();
/* from var.c: */
More information about the busybox-cvs
mailing list