mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
The Great Embooleanating
A large number of functions had return values and/or arguments changed to use ``bool`` types instead of ``int``.
This commit is contained in:
parent
3c470ffe13
commit
fd5e15b116
145 changed files with 1288 additions and 1331 deletions
|
@ -230,7 +230,7 @@ bool Manager::CreateStream(EnumVal* id, RecordVal* sval)
|
|||
{
|
||||
RecordType* rtype = sval->Type()->AsRecordType();
|
||||
|
||||
if ( ! same_type(rtype, BifType::Record::Log::Stream, 0) )
|
||||
if ( ! same_type(rtype, BifType::Record::Log::Stream, false) )
|
||||
{
|
||||
reporter->Error("sval argument not of right type");
|
||||
return false;
|
||||
|
@ -288,7 +288,7 @@ bool Manager::CreateStream(EnumVal* id, RecordVal* sval)
|
|||
if ( ! same_type((*args)[0], columns) )
|
||||
{
|
||||
reporter->Error("stream event's argument type does not match column record type");
|
||||
return val_mgr->GetBool(0);
|
||||
return val_mgr->GetFalse();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -533,7 +533,7 @@ bool Manager::AddFilter(EnumVal* id, RecordVal* fval)
|
|||
{
|
||||
RecordType* rtype = fval->Type()->AsRecordType();
|
||||
|
||||
if ( ! same_type(rtype, BifType::Record::Log::Filter, 0) )
|
||||
if ( ! same_type(rtype, BifType::Record::Log::Filter, false) )
|
||||
{
|
||||
reporter->Error("filter argument not of right type");
|
||||
return false;
|
||||
|
@ -1401,7 +1401,7 @@ public:
|
|||
|
||||
~RotationTimer();
|
||||
|
||||
void Dispatch(double t, int is_expire);
|
||||
void Dispatch(double t, bool is_expire) override;
|
||||
|
||||
protected:
|
||||
Manager::WriterInfo* winfo;
|
||||
|
@ -1414,7 +1414,7 @@ RotationTimer::~RotationTimer()
|
|||
winfo->rotation_timer = 0;
|
||||
}
|
||||
|
||||
void RotationTimer::Dispatch(double t, int is_expire)
|
||||
void RotationTimer::Dispatch(double t, bool is_expire)
|
||||
{
|
||||
winfo->rotation_timer = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue