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:
Tim Wojtulewicz 2020-03-11 10:41:46 -07:00 committed by Robin Sommer
parent 3c470ffe13
commit fd5e15b116
145 changed files with 1288 additions and 1331 deletions

View file

@ -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