mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
Fix some minor Coverity Scan complaints.
This commit is contained in:
parent
432744fde4
commit
dec96234e3
6 changed files with 14 additions and 2 deletions
|
@ -506,6 +506,7 @@ bool PktSrc::ApplyBPFFilter(int index, const struct pcap_pkthdr *hdr, const u_ch
|
|||
{
|
||||
Error(fmt("BPF filter %d not compiled", index));
|
||||
Close();
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( code->MatchesAnything() )
|
||||
|
|
|
@ -266,7 +266,11 @@ protected:
|
|||
|
||||
Properties()
|
||||
{
|
||||
selectable_fd = -1;
|
||||
link_type = -1;
|
||||
hdr_size = -1;
|
||||
netmask = PCAP_NETMASK_UNKNOWN;
|
||||
is_live = false;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -21,6 +21,9 @@ PcapSource::PcapSource(const std::string& path, bool is_live)
|
|||
{
|
||||
props.path = path;
|
||||
props.is_live = is_live;
|
||||
pd = 0;
|
||||
memset(¤t_hdr, 0, sizeof(current_hdr));
|
||||
memset(&last_hdr, 0, sizeof(last_hdr));
|
||||
last_data = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue