diff options
author | cjihrig <cjihrig@gmail.com> | 2019-02-06 08:57:18 -0500 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2019-02-08 09:11:15 -0500 |
commit | 39171d755d3e81f03ac0fd716cd80c2e20882fb6 (patch) | |
tree | 39e23f22c024aa63b87a8cb348413892353e0c84 | |
parent | 4b4d46539d5e1dbb1b076e762136566eff3a2197 (diff) | |
download | android-node-v8-39171d755d3e81f03ac0fd716cd80c2e20882fb6.tar.gz android-node-v8-39171d755d3e81f03ac0fd716cd80c2e20882fb6.tar.bz2 android-node-v8-39171d755d3e81f03ac0fd716cd80c2e20882fb6.zip |
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 <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
-rw-r--r-- | src/node_report_utils.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/node_report_utils.cc b/src/node_report_utils.cc index 181589b441..f827eadede 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; |