Skip to content

Commit 34df4b3

Browse files
tniessenaduh95
authored andcommitted
src: use bool literals in TraceEnvVarOptions
The bit fields are declared as `bool` fields, yet are assigned integer values. PR-URL: #61425 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent ade646a commit 34df4b3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/node_env_var.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,9 @@ Maybe<void> KVStore::AssignToObject(v8::Isolate* isolate,
358358
}
359359

360360
struct TraceEnvVarOptions {
361-
bool print_message : 1 = 0;
362-
bool print_js_stack : 1 = 0;
363-
bool print_native_stack : 1 = 0;
361+
bool print_message : 1 = false;
362+
bool print_js_stack : 1 = false;
363+
bool print_native_stack : 1 = false;
364364
};
365365

366366
template <typename... Args>
@@ -385,13 +385,13 @@ TraceEnvVarOptions GetTraceEnvVarOptions(Environment* env) {
385385
? env->options()
386386
: per_process::cli_options->per_isolate->per_env;
387387
if (cli_options->trace_env) {
388-
options.print_message = 1;
388+
options.print_message = true;
389389
};
390390
if (cli_options->trace_env_js_stack) {
391-
options.print_js_stack = 1;
391+
options.print_js_stack = true;
392392
};
393393
if (cli_options->trace_env_native_stack) {
394-
options.print_native_stack = 1;
394+
options.print_native_stack = true;
395395
};
396396
return options;
397397
}

0 commit comments

Comments
 (0)