Skip to content

Commit

Permalink
format-cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan-Arrowood committed Feb 5, 2024
1 parent 25be48a commit 0ca3be5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
22 changes: 10 additions & 12 deletions src/node_report.cc
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,7 @@ static void PrintVersionInformation(JSONWriter* writer, bool network_disabled) {
}

PrintCpuInfo(writer);
if (!network_disabled)
PrintNetworkInterfaceInfo(writer);
if (!network_disabled) PrintNetworkInterfaceInfo(writer);

char host[UV_MAXHOSTNAMESIZE];
size_t host_size = sizeof(host);
Expand Down Expand Up @@ -923,16 +922,15 @@ std::string TriggerNodeReport(Isolate* isolate,

bool network_disabled = env->options()->report_network_disabled;

report::WriteNodeReport(
isolate,
env,
message,
trigger,
filename,
*outstream,
error,
compact,
network_disabled);
report::WriteNodeReport(isolate,
env,
message,
trigger,
filename,
*outstream,
error,
compact,
network_disabled);

// Do not close stdout/stderr, only close files we opened.
if (outfile.is_open()) {
Expand Down
6 changes: 3 additions & 3 deletions src/node_report_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ static void GetNetworkDisabled(const FunctionCallbackInfo<Value>& info) {
}

static void SetNetworkDisabled(const FunctionCallbackInfo<Value>& info) {
Mutex::ScopedLock lock(per_process::cli_options_mutex);
Mutex::ScopedLock lock(per_process::cli_options_mutex);
Environment* env = Environment::GetCurrent(info);
Isolate* isolate = env->isolate();
env->options()->report_network_disabled
= info[0]->ToBoolean(isolate)->Value();
env->options()->report_network_disabled =
info[0]->ToBoolean(isolate)->Value();
}

static void GetDirectory(const FunctionCallbackInfo<Value>& info) {
Expand Down

0 comments on commit 0ca3be5

Please sign in to comment.