Update deprecated ValManager GetTrue/GetFalse usages

This commit is contained in:
Jon Siwek 2020-04-07 20:41:58 -07:00
parent 202b3f877d
commit 9af84bb2b0
24 changed files with 219 additions and 219 deletions

View file

@ -321,7 +321,7 @@ IntrusivePtr<Val> BroFunc::Call(const zeek::Args& args, Frame* parent) const
{
// Can only happen for events and hooks.
assert(Flavor() == FUNC_FLAVOR_EVENT || Flavor() == FUNC_FLAVOR_HOOK);
return Flavor() == FUNC_FLAVOR_HOOK ? IntrusivePtr{AdoptRef{}, val_mgr->GetTrue()} : nullptr;
return Flavor() == FUNC_FLAVOR_HOOK ? val_mgr->True() : nullptr;
}
auto f = make_intrusive<Frame>(frame_size, this, &args);
@ -407,7 +407,7 @@ IntrusivePtr<Val> BroFunc::Call(const zeek::Args& args, Frame* parent) const
if ( flow == FLOW_BREAK )
{
// Short-circuit execution of remaining hook handler bodies.
result = {AdoptRef{}, val_mgr->GetFalse()};
result = val_mgr->False();
break;
}
}
@ -418,7 +418,7 @@ IntrusivePtr<Val> BroFunc::Call(const zeek::Args& args, Frame* parent) const
if ( Flavor() == FUNC_FLAVOR_HOOK )
{
if ( ! result )
result = {AdoptRef{}, val_mgr->GetTrue()};
result = val_mgr->True();
}
// Warn if the function returns something, but we returned from