mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Use .contains() instead of .find() or .count()
This commit is contained in:
parent
d20550f553
commit
b592b6c998
68 changed files with 201 additions and 207 deletions
|
@ -292,12 +292,8 @@ private:
|
|||
__attribute__((format(printf, 4, 5)));
|
||||
;
|
||||
void UpdateWeirdStats(const char* name);
|
||||
inline bool WeirdOnSamplingWhiteList(const char* name) {
|
||||
return weird_sampling_whitelist.find(name) != weird_sampling_whitelist.end();
|
||||
}
|
||||
inline bool WeirdOnGlobalList(const char* name) {
|
||||
return weird_sampling_global_list.find(name) != weird_sampling_global_list.end();
|
||||
}
|
||||
inline bool WeirdOnSamplingWhiteList(const char* name) { return weird_sampling_whitelist.contains(name); }
|
||||
inline bool WeirdOnGlobalList(const char* name) { return weird_sampling_global_list.contains(name); }
|
||||
bool PermitNetWeird(const char* name);
|
||||
bool PermitFlowWeird(const char* name, const IPAddr& o, const IPAddr& r);
|
||||
bool PermitExpiredConnWeird(const char* name, const RecordVal& conn_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue