]> granicus.if.org Git - sudo/commitdiff
Don't need YY_FLUSH_BUFFER after all
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 9 Nov 1999 20:06:53 +0000 (20:06 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 9 Nov 1999 20:06:53 +0000 (20:06 +0000)
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).

lex.yy.c
parse.lex

index 59c15367db115a2180bdedfdf8475156c48917ca..21cc8feba3caa78ae4aab3b195590d7434da3413 100644 (file)
--- 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();
index 8aaffdd9a1c081d653133223b1c0dc30d0ff0c45..7831bd444c60cf4755868bdfc756a1bd4d8794cf 100644 (file)
--- 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();