mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +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
10
src/File.h
10
src/File.h
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue