Skip to content

Commit 813993b

Browse files
authored
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 <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
1 parent 3b69757 commit 813993b

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
@@ -360,9 +360,9 @@ Maybe<void> KVStore::AssignToObject(v8::Isolate* isolate,
360360
}
361361

362362
struct TraceEnvVarOptions {
363-
bool print_message : 1 = 0;
364-
bool print_js_stack : 1 = 0;
365-
bool print_native_stack : 1 = 0;
363+
bool print_message : 1 = false;
364+
bool print_js_stack : 1 = false;
365+
bool print_native_stack : 1 = false;
366366
};
367367

368368
template <typename... Args>
@@ -387,13 +387,13 @@ TraceEnvVarOptions GetTraceEnvVarOptions(Environment* env) {
387387
? env->options()
388388
: per_process::cli_options->per_isolate->per_env;
389389
if (cli_options->trace_env) {
390-
options.print_message = 1;
390+
options.print_message = true;
391391
};
392392
if (cli_options->trace_env_js_stack) {
393-
options.print_js_stack = 1;
393+
options.print_js_stack = true;
394394
};
395395
if (cli_options->trace_env_native_stack) {
396-
options.print_native_stack = 1;
396+
options.print_native_stack = true;
397397
};
398398
return options;
399399
}

0 commit comments

Comments
 (0)