mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/topic/jsiwek/remove-lexer-dead-code'
* origin/topic/jsiwek/remove-lexer-dead-code: scan.l: Remove "constant" did_module_restore logic
This commit is contained in:
commit
48362cc0c0
3 changed files with 8 additions and 16 deletions
4
CHANGES
4
CHANGES
|
@ -1,4 +1,8 @@
|
||||||
|
|
||||||
|
3.2.0-dev.874 | 2020-07-08 17:46:20 -0700
|
||||||
|
|
||||||
|
* scan.l: Remove "constant" did_module_restore logic / dead code (Arne Welzel)
|
||||||
|
|
||||||
3.2.0-dev.872 | 2020-07-08 12:25:11 -0700
|
3.2.0-dev.872 | 2020-07-08 12:25:11 -0700
|
||||||
|
|
||||||
* Fix FreeBSD CI script to install right SWIG package (Jon Siwek, Corelight)
|
* Fix FreeBSD CI script to install right SWIG package (Jon Siwek, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
3.2.0-dev.872
|
3.2.0-dev.874
|
||||||
|
|
18
src/scan.l
18
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.
|
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;
|
FILE* f = 0;
|
||||||
|
|
||||||
if ( streq(orig_file, "-") )
|
if ( streq(orig_file, "-") )
|
||||||
|
@ -644,18 +641,9 @@ static int load_files(const char* orig_file)
|
||||||
LoadPolicyFileText(file_path.c_str());
|
LoadPolicyFileText(file_path.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remember where we were. If this is the first
|
// Remember where we were to restore the module scope in which
|
||||||
// file being pushed on the stack, i.e., the *last*
|
// this @load was done when we're finished processing it.
|
||||||
// one that will be processed, then we want to
|
file_stack.push_back(new FileInfo(zeek::detail::current_module));
|
||||||
// restore the module scope in which this @load
|
|
||||||
// was done when we're finished processing it.
|
|
||||||
if ( ! did_module_restore )
|
|
||||||
{
|
|
||||||
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);
|
zeekygen_mgr->Script(file_path);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue