Skip to content
Permalink
Browse files

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: #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>
  • Loading branch information...
cjihrig authored and addaleax committed Feb 6, 2019
1 parent 8494a61 commit 3f400310bdfe16136efb1fd0d4809c8cdf69328a
Showing with 3 additions and 3 deletions.
  1. +3 −3 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;

0 comments on commit 3f40031

Please sign in to comment.
You can’t perform that action at this time.