mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Switch AnalyOpt::only_func to optional<string>
Nothing of consequence; may help express meaning and memory management.
This commit is contained in:
parent
48da8b7d66
commit
81fa7f7e3d
3 changed files with 11 additions and 4 deletions
|
@ -28,7 +28,7 @@ void optimize_func(ScriptFunc* f, ProfileFunc* pf, ScopePtr scope_ptr,
|
|||
return;
|
||||
|
||||
if ( analysis_options.only_func &&
|
||||
! util::streq(f->Name(), analysis_options.only_func) )
|
||||
*analysis_options.only_func != f->Name() )
|
||||
return;
|
||||
|
||||
if ( analysis_options.only_func )
|
||||
|
@ -110,7 +110,11 @@ void analyze_scripts(Options& opts)
|
|||
check_env_opt("ZEEK_XFORM", analysis_options.activate);
|
||||
|
||||
if ( ! analysis_options.only_func )
|
||||
analysis_options.only_func = getenv("ZEEK_ONLY");
|
||||
{
|
||||
auto zo = getenv("ZEEK_ONLY");
|
||||
if ( zo )
|
||||
analysis_options.only_func = zo;
|
||||
}
|
||||
|
||||
if ( analysis_options.only_func )
|
||||
analysis_options.activate = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue