Update fprintf stream and if condition order

This commit is contained in:
jhnh204 2025-06-13 14:55:25 +09:00
parent 03cb4db8e1
commit 776d357c85

View File

@ -575,17 +575,17 @@ static void uv__print_handles(uv_loop_t* loop, int only_active, FILE* stream) {
struct uv__queue* q;
uv_handle_t* h;
if (stream == NULL)
stream = stderr;
if (loop == NULL) {
loop = uv_default_loop();
if (loop == NULL) {
fprintf(stderr, "uv_default_loop() failed\n");
fprintf(stream, "uv_default_loop() failed\n");
return;
}
}
if (stream == NULL)
stream = stderr;
uv__queue_foreach(q, &loop->handle_queue) {
h = uv__queue_data(q, uv_handle_t, handle_queue);