Skip to content

Commit

Permalink
report: widen scope of #ifndef
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
  • Loading branch information
cjihrig authored and addaleax committed Feb 8, 2019
1 parent 8494a61 commit 3f40031
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/node_report_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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;
Expand Down

0 comments on commit 3f40031

Please sign in to comment.