1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[win32] minor optimisation

This commit is contained in:
Witold Filipczyk 2022-05-03 13:05:51 +02:00
parent 799313529b
commit 5274a0fe19

View File

@ -604,7 +604,7 @@ select_one_loop(int num_fds, struct fd_set *rd, struct fd_set *wr,
FD_SET(fd - SOCK_SHIFT, &sock_wr); FD_SET(fd - SOCK_SHIFT, &sock_wr);
FD_SET(fd - SOCK_SHIFT, &sock_ex); FD_SET(fd - SOCK_SHIFT, &sock_ex);
sel_rc = select(fd + 1, &sock_rd, NULL, NULL, &tv); sel_rc = select(fd - SOCK_SHIFT + 1, &sock_rd, NULL, NULL, &tv);
if (sel_rc > 0) { if (sel_rc > 0) {
FD_SET(fd, rd); FD_SET(fd, rd);
rc++; rc++;
@ -613,7 +613,7 @@ select_one_loop(int num_fds, struct fd_set *rd, struct fd_set *wr,
} }
if (wr) { if (wr) {
sel_rc = select(fd + 1, NULL, &sock_wr, NULL, &tv); sel_rc = select(fd - SOCK_SHIFT + 1, NULL, &sock_wr, NULL, &tv);
if (sel_rc > 0) { if (sel_rc > 0) {
FD_SET (fd, wr); FD_SET (fd, wr);
rc++; rc++;
@ -622,7 +622,7 @@ select_one_loop(int num_fds, struct fd_set *rd, struct fd_set *wr,
} }
} }
sel_rc = select(fd + 1, NULL, NULL, &sock_ex, &tv); sel_rc = select(fd - SOCK_SHIFT + 1, NULL, NULL, &sock_ex, &tv);
if (sel_rc > 0) { if (sel_rc > 0) {
FD_SET (fd, ex); FD_SET (fd, ex);
rc++; rc++;