mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 23:28:20 +00:00
iosource/threading/input/logging: Replace nulls with nullptr
This commit is contained in:
parent
4ee84b69f2
commit
cb01e098df
27 changed files with 154 additions and 156 deletions
|
@ -51,7 +51,7 @@ const std::string& PktSrc::Path() const
|
|||
|
||||
const char* PktSrc::ErrorMsg() const
|
||||
{
|
||||
return errbuf.size() ? errbuf.c_str() : 0;
|
||||
return errbuf.size() ? errbuf.c_str() : nullptr;
|
||||
}
|
||||
|
||||
int PktSrc::LinkType() const
|
||||
|
@ -66,7 +66,7 @@ uint32_t PktSrc::Netmask() const
|
|||
|
||||
bool PktSrc::IsError() const
|
||||
{
|
||||
return ErrorMsg();
|
||||
return ! errbuf.empty();
|
||||
}
|
||||
|
||||
bool PktSrc::IsLive() const
|
||||
|
@ -153,7 +153,7 @@ void PktSrc::Info(const std::string& msg)
|
|||
|
||||
void PktSrc::Weird(const std::string& msg, const Packet* p)
|
||||
{
|
||||
sessions->Weird(msg.c_str(), p, 0);
|
||||
sessions->Weird(msg.c_str(), p, nullptr);
|
||||
}
|
||||
|
||||
void PktSrc::InternalError(const std::string& msg)
|
||||
|
@ -299,9 +299,9 @@ bool PktSrc::PrecompileBPFFilter(int index, const std::string& filter)
|
|||
BPF_Program* PktSrc::GetBPFFilter(int index)
|
||||
{
|
||||
if ( index < 0 )
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
return (static_cast<int>(filters.size()) > index ? filters[index] : 0);
|
||||
return (static_cast<int>(filters.size()) > index ? filters[index] : nullptr);
|
||||
}
|
||||
|
||||
bool PktSrc::ApplyBPFFilter(int index, const struct pcap_pkthdr *hdr, const u_char *pkt)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue