mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +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
|
@ -107,7 +107,7 @@ void BroString::Adopt(byte_vec bytes, int len)
|
|||
|
||||
// Check if the string ends with a NUL. If so, mark it as having
|
||||
// a final NUL and adjust the length accordingly.
|
||||
final_NUL = (b[len-1] == '\0') ? 1 : 0;
|
||||
final_NUL = (b[len-1] == '\0');
|
||||
n = len - final_NUL;
|
||||
}
|
||||
|
||||
|
@ -289,7 +289,7 @@ BroString* BroString::GetSubstring(int start, int len) const
|
|||
if ( len < 0 || len > n - start )
|
||||
len = n - start;
|
||||
|
||||
return new BroString(&b[start], len, 1);
|
||||
return new BroString(&b[start], len, true);
|
||||
}
|
||||
|
||||
int BroString::FindSubstring(const BroString* s) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue