mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 00:28:21 +00:00
Changes in response to Johanna's code review.
This commit is contained in:
parent
2f05318a08
commit
56e234a762
3 changed files with 18 additions and 6 deletions
10
src/Val.cc
10
src/Val.cc
|
@ -1991,9 +1991,15 @@ ValPtr TableVal::FindOrDefault(const ValPtr& index)
|
|||
return Default(index);
|
||||
}
|
||||
|
||||
bool TableVal::Contains(const IPAddr& addr)
|
||||
const bool TableVal::Contains(const IPAddr& addr)
|
||||
{
|
||||
return subnets ? subnets->Lookup(addr, true) != 0 : false;
|
||||
if ( ! subnets )
|
||||
{
|
||||
reporter->InternalError("LookupSubnets called on wrong table type");
|
||||
return false;
|
||||
}
|
||||
|
||||
return (subnets->Lookup(addr, true) != 0);
|
||||
}
|
||||
|
||||
Val* TableVal::Lookup(Val* index, bool use_default_val)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue