[klibc] [klibc:update-dash] [PARSER] Removed unnecessary pungetc on EOF from parser

klibc-bot for Herbert Xu herbert at gondor.apana.org.au
Thu Jan 24 19:15:29 PST 2019

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)
-			else
-				pungetc();		/* push back EOF on input */
 			return n1;

More information about the klibc mailing list