diff --git a/tools/bifcl/builtin-func.l b/tools/bifcl/builtin-func.l index 5b98f054d4..8f0468ceab 100644 --- a/tools/bifcl/builtin-func.l +++ b/tools/bifcl/builtin-func.l @@ -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: diff --git a/tools/bifcl/builtin-func.y b/tools/bifcl/builtin-func.y index 2188eb3293..365ff15bd3 100644 --- a/tools/bifcl/builtin-func.y +++ b/tools/bifcl/builtin-func.y @@ -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