mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
bifcl: Use bools for boolean comparisons
This commit is contained in:
parent
224a42e1f0
commit
8662b29ac6
2 changed files with 8 additions and 8 deletions
|
@ -23,7 +23,7 @@ char* copy_string(const char* s)
|
|||
|
||||
int line_number = 1;
|
||||
|
||||
extern int in_c_code;
|
||||
extern bool in_c_code;
|
||||
|
||||
int check_c_mode(int t)
|
||||
{
|
||||
|
@ -156,7 +156,7 @@ extern int yyparse();
|
|||
char* input_filename = nullptr;
|
||||
char* input_filename_with_path = nullptr;
|
||||
char* plugin = nullptr;
|
||||
int alternative_mode = 0;
|
||||
bool alternative_mode = false;
|
||||
|
||||
FILE* fp_zeek_init = nullptr;
|
||||
FILE* fp_func_def = nullptr;
|
||||
|
@ -339,12 +339,12 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
switch ( opt ) {
|
||||
case 'p':
|
||||
alternative_mode = 1;
|
||||
alternative_mode = true;
|
||||
plugin = (char*) optarg;
|
||||
break;
|
||||
|
||||
case 's':
|
||||
alternative_mode = 1;
|
||||
alternative_mode = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -17,7 +17,7 @@ extern int line_number;
|
|||
extern char* input_filename;
|
||||
extern char* input_filename_with_path;
|
||||
extern char* plugin;
|
||||
extern int alternative_mode;
|
||||
extern bool alternative_mode;
|
||||
|
||||
#define print_line_directive(fp) fprintf(fp, "\n#line %d \"%s\"\n", line_number, input_filename_with_path)
|
||||
|
||||
|
@ -29,7 +29,7 @@ extern FILE* fp_netvar_h;
|
|||
extern FILE* fp_netvar_def;
|
||||
extern FILE* fp_netvar_init;
|
||||
|
||||
int in_c_code = 0;
|
||||
bool in_c_code = false;
|
||||
string current_module = GLOBAL_MODULE_NAME;
|
||||
int definition_type;
|
||||
string type_name;
|
||||
|
@ -686,13 +686,13 @@ body: body_start c_body body_end
|
|||
|
||||
c_code_begin: /* empty */
|
||||
{
|
||||
in_c_code = 1;
|
||||
in_c_code = true;
|
||||
print_line_directive(fp_func_def);
|
||||
}
|
||||
;
|
||||
|
||||
c_code_end: /* empty */
|
||||
{ in_c_code = 0; }
|
||||
{ in_c_code = false; }
|
||||
;
|
||||
|
||||
body_start: TOK_LPB c_code_begin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue