From 3f400310bdfe16136efb1fd0d4809c8cdf69328a Mon Sep 17 00:00:00 2001 From: cjihrig Date: Wed, 6 Feb 2019 08:57:18 -0500 Subject: [PATCH] report: widen scope of #ifndef This commit moves a #ifndef _WIN32 to contain the entire if statement that inspects file descriptors. Prior to this commit, the #ifndef was inside the if, making it essentially dead code on Windows. PR-URL: https://github.com/nodejs/node/pull/25960 Reviewed-By: Anna Henningsen Reviewed-By: Refael Ackermann Reviewed-By: James M Snell Reviewed-By: Richard Lau --- src/node_report_utils.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/node_report_utils.cc b/src/node_report_utils.cc index 181589b44168a0..f827eadede8eb8 100644 --- a/src/node_report_utils.cc +++ b/src/node_report_utils.cc @@ -163,12 +163,12 @@ void WalkHandle(uv_handle_t* h, void* arg) { << ", recv buffer size: " << recv_size; } +#ifndef _WIN32 if (h->type == UV_TCP || h->type == UV_NAMED_PIPE || h->type == UV_TTY || h->type == UV_UDP || h->type == UV_POLL) { uv_os_fd_t fd_v; int rc = uv_fileno(h, &fd_v); - // uv_os_fd_t is an int on Unix and HANDLE on Windows. -#ifndef _WIN32 + if (rc == 0) { switch (fd_v) { case 0: @@ -185,8 +185,8 @@ void WalkHandle(uv_handle_t* h, void* arg) { break; } } -#endif } +#endif if (h->type == UV_TCP || h->type == UV_NAMED_PIPE || h->type == UV_TTY) { data << ", write queue size: " << handle->stream.write_queue_size;