klibc-bot for Herbert Xu
2020-Mar-28 21:48 UTC
[klibc] [klibc:update-dash] dash: [PARSER] Removed unnecessary pungetc on EOF from parser
Commit-ID: 1e4af96f419af543624e38676fecd88c6691883d Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=1e4af96f419af543624e38676fecd88c6691883d Author: Herbert Xu <herbert at gondor.apana.org.au> AuthorDate: Tue, 28 Oct 2014 10:32:03 +0800 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 28 Mar 2020 21:42:54 +0000 [klibc] dash: [PARSER] Removed unnecessary pungetc on EOF from parser [ dash commit a31c812b02d7fc331f8a0c5aedbbf12b4025c1db ] Doing a pungetc on an EOF is a noop and is only useful when we don't know what character we're putting back. This patch removes an unnecessary pungetc when we know it's EOF. Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/dash/parser.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr/dash/parser.c b/usr/dash/parser.c index f6c43be0..f0c919d5 100644 --- a/usr/dash/parser.c +++ b/usr/dash/parser.c @@ -208,8 +208,6 @@ list(int nlflag) case TEOF: if (heredoclist) parseheredoc(); - else - pungetc(); /* push back EOF on input */ tokpushback++; return n1; default:
Maybe Matching Threads
- [klibc:update-dash] [PARSER] Removed unnecessary pungetc on EOF from parser
- [klibc:update-dash] [PARSER] Simplify EOF/newline handling in list parser
- [klibc:update-dash] dash: [PARSER] Simplify EOF/newline handling in list parser
- [klibc:update-dash] [SHELL] Optimize dash -c "command" to avoid a fork
- [klibc:update-dash] dash: [SHELL] Optimize dash -c "command" to avoid a fork