diff --git a/src/node_report_utils.cc b/src/node_report_utils.cc index 5013fd7a875216..23d18fab99f54b 100644 --- a/src/node_report_utils.cc +++ b/src/node_report_utils.cc @@ -192,15 +192,17 @@ void WalkHandle(uv_handle_t* h, void* arg) { if (rc == 0) { writer->json_keyvalue("fd", static_cast(fd_v)); switch (fd_v) { - case 0: + case STDIN_FILENO: writer->json_keyvalue("stdio", "stdin"); break; - case 1: + case STDOUT_FILENO: writer->json_keyvalue("stdio", "stdout"); break; - case 2: + case STDERR_FILENO: writer->json_keyvalue("stdio", "stderr"); break; + default: + break; } } }