mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 14:08:20 +00:00
scan.l: Remove "constant" did_module_restore logic
Doesn't seem like did_module_restore has any effect on the code flow.
This commit is contained in:
parent
d15dd37b84
commit
93e7f40b70
1 changed files with 3 additions and 15 deletions
16
src/scan.l
16
src/scan.l
|
@ -592,9 +592,6 @@ static int load_files(const char* orig_file)
|
|||
|
||||
assert(rc == -1); // No plugin in charge of this file.
|
||||
|
||||
// Whether we pushed on a FileInfo that will restore the
|
||||
// current module after the final file has been scanned.
|
||||
bool did_module_restore = false;
|
||||
FILE* f = 0;
|
||||
|
||||
if ( streq(orig_file, "-") )
|
||||
|
@ -644,18 +641,9 @@ static int load_files(const char* orig_file)
|
|||
LoadPolicyFileText(file_path.c_str());
|
||||
}
|
||||
|
||||
// Remember where we were. If this is the first
|
||||
// file being pushed on the stack, i.e., the *last*
|
||||
// one that will be processed, then we want to
|
||||
// restore the module scope in which this @load
|
||||
// was done when we're finished processing it.
|
||||
if ( ! did_module_restore )
|
||||
{
|
||||
// Remember where we were to restore the module scope in which
|
||||
// this @load was done when we're finished processing it.
|
||||
file_stack.push_back(new FileInfo(zeek::detail::current_module));
|
||||
did_module_restore = true;
|
||||
}
|
||||
else
|
||||
file_stack.push_back(new FileInfo);
|
||||
|
||||
zeekygen_mgr->Script(file_path);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue