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

@ -29,7 +29,7 @@ public:
const char* Name() const;
// Returns false if an error occured.
int Write(const char* data, int len = 0);
bool Write(const char* data, int len = 0);
void Flush() { fflush(f); }
@ -42,11 +42,11 @@ public:
// Whether the file is open in a general sense; it might
// not be open as a Unix file due to our management of
// a finite number of FDs.
int IsOpen() const { return is_open; }
bool IsOpen() const { return is_open; }
// Returns true if the close made sense, false if it was already
// closed, not active, or whatever.
int Close();
bool Close();
void Describe(ODesc* d) const override;
@ -97,10 +97,10 @@ protected:
IntrusivePtr<BroType> t;
char* name;
char* access;
int is_open; // whether the file is open in a general sense
Attributes* attrs;
bool buffered;
double open_time;
bool is_open; // whether the file is open in a general sense
bool buffered;
bool raw_output;
static const int MIN_BUFFER_SIZE = 1024;