mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 21:48:21 +00:00
Remove error message from empty bloomfilter lookups
If a bloomfilter doesn't have a type, that just means no bloomfilter_add() has been called yet, so seems undesirable to emit an error for a lookup against something that's known to be empty.
This commit is contained in:
parent
6e2cd3ae44
commit
f452f26d11
3 changed files with 3 additions and 1 deletions
|
@ -174,7 +174,7 @@ function bloomfilter_lookup%(bf: opaque of bloomfilter, x: any%): count
|
|||
const BloomFilterVal* bfv = static_cast<const BloomFilterVal*>(bf);
|
||||
|
||||
if ( ! bfv->Type() )
|
||||
reporter->Error("cannot perform lookup on untyped Bloom filter");
|
||||
return val_mgr->GetCount(0);
|
||||
|
||||
else if ( ! same_type(bfv->Type(), x->Type()) )
|
||||
reporter->Error("incompatible Bloom filter types");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue