From 955dfa520a28ea5070d4f409746566f654241de2 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 28 Aug 2001 20:39:22 +0000 Subject: [PATCH] oops --- winsup/cygwin/select.cc | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 6914cd236..42762baa5 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -168,8 +168,7 @@ cygwin_select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, /* Degenerate case. No fds to wait for. Just wait. */ if (sel.start.next == NULL) { - if (readfds != dummy_readfds && writefds != dummy_writefds && exceptfds != dummy_exceptfds && - WaitForSingleObject (signal_arrived, ms) == WAIT_OBJECT_0) + if (WaitForSingleObject (signal_arrived, ms) == WAIT_OBJECT_0) { select_printf ("signal received"); set_sig_errno (EINTR); @@ -481,12 +480,9 @@ static int poll_pipe (select_record *me, fd_set *readfds, fd_set *writefds, fd_set *exceptfds) { - int doit = me->read_ready || me->write_ready || me->except_ready; - - if (!doit) - peek_pipe (me, 0); - - return doit ? set_bits (me, readfds, writefds, exceptfds) : 0; + return peek_pipe (me, 0) ? + set_bits (me, readfds, writefds, exceptfds) : + 0; } MAKEready(pipe) @@ -1192,12 +1188,9 @@ static int poll_socket (select_record *me, fd_set *readfds, fd_set *writefds, fd_set *exceptfds) { - int doit = me->read_ready || me->write_ready || me->except_ready; - - if (!doit) - peek_socket (me, 0); - - return doit ? set_bits (me, readfds, writefds, exceptfds) : 0; + return peek_socket (me, 0) ? + set_bits (me, readfds, writefds, exceptfds) : + 0; } MAKEready (socket)