klibc-bot for Herbert Xu
2019-Jan-25 03:15 UTC
[klibc] [klibc:update-dash] [PARSER] Removed unnecessary pungetc on EOF from parser
Commit-ID: 68538dfb6bf8b4d98d973c80cd77e843fa0b24b7 Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=68538dfb6bf8b4d98d973c80cd77e843fa0b24b7 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: Fri, 25 Jan 2019 02:57:21 +0000 [klibc] [PARSER] Removed unnecessary pungetc on EOF from parser 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:
Reasonably Related Threads
- [klibc:update-dash] 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] dash: parser: Do not push token back before parseheredoc
- [klibc:update-dash] [SHELL] Optimize dash -c "command" to avoid a fork