From: Todd C. Miller Date: Tue, 9 Nov 1999 20:06:53 +0000 (+0000) Subject: Don't need YY_FLUSH_BUFFER after all X-Git-Tag: SUDO_1_6_0~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=818bbacb5ddd375085f556008ba475ca6d58828f;p=sudo Don't need YY_FLUSH_BUFFER after all Move yyrestart() into visudo.c since it might not get called in yywrap if we get a parse error (and we only reread the file on error anyway). --- diff --git a/lex.yy.c b/lex.yy.c index 59c15367d..21cc8feba 100644 --- a/lex.yy.c +++ b/lex.yy.c @@ -2958,12 +2958,6 @@ int yywrap() { - /* Flush any buffers that might still exist. */ - YY_FLUSH_BUFFER; - - /* Set file pointer to the beginning so we can re-run the parser. */ - yyrestart(yyin); - /* Free space used by the aliases unless called by testsudoers. */ if (clearaliases) reset_aliases(); diff --git a/parse.lex b/parse.lex index 8aaffdd9a..7831bd444 100644 --- a/parse.lex +++ b/parse.lex @@ -416,12 +416,6 @@ int yywrap() { - /* Flush any buffers that might still exist. */ - YY_FLUSH_BUFFER; - - /* Set file pointer to the beginning so we can re-run the parser. */ - yyrestart(yyin); - /* Free space used by the aliases unless called by testsudoers. */ if (clearaliases) reset_aliases();