mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-29 13:28:10 +00:00
now use yyrestart() if flex
now reset yylineno to 0
This commit is contained in:
parent
c87dbc5fd9
commit
a1ebf256df
6
visudo.c
6
visudo.c
@ -238,7 +238,11 @@ main(argc, argv)
|
||||
sudoers, *argv);
|
||||
Exit(0);
|
||||
}
|
||||
#ifdef HAVE_FLEX
|
||||
yyrestart(sudoers_tmp_fp);
|
||||
#else
|
||||
yyin = sudoers_tmp_fp;
|
||||
#endif /* HAVE_FLEX */
|
||||
yyout = stdout;
|
||||
|
||||
/* parse the file */
|
||||
@ -258,7 +262,7 @@ main(argc, argv)
|
||||
*/
|
||||
err_line_no = (status == 0) ? 0 : status - 1;
|
||||
status = 0;
|
||||
yylineno = 1;
|
||||
yylineno = 0;
|
||||
|
||||
(void) fclose(sudoers_tmp_fp);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user