Skip to content

Commit 3f40031

Browse files
cjihrigaddaleax
authored andcommitted
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>
1 parent 8494a61 commit 3f40031

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/node_report_utils.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,12 @@ void WalkHandle(uv_handle_t* h, void* arg) {
163163
<< ", recv buffer size: " << recv_size;
164164
}
165165

166+
#ifndef _WIN32
166167
if (h->type == UV_TCP || h->type == UV_NAMED_PIPE || h->type == UV_TTY ||
167168
h->type == UV_UDP || h->type == UV_POLL) {
168169
uv_os_fd_t fd_v;
169170
int rc = uv_fileno(h, &fd_v);
170-
// uv_os_fd_t is an int on Unix and HANDLE on Windows.
171-
#ifndef _WIN32
171+
172172
if (rc == 0) {
173173
switch (fd_v) {
174174
case 0:
@@ -185,8 +185,8 @@ void WalkHandle(uv_handle_t* h, void* arg) {
185185
break;
186186
}
187187
}
188-
#endif
189188
}
189+
#endif
190190

191191
if (h->type == UV_TCP || h->type == UV_NAMED_PIPE || h->type == UV_TTY) {
192192
data << ", write queue size: " << handle->stream.write_queue_size;

0 commit comments

Comments
 (0)