This is the mail archive of the cygwin-developers@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

poll() fix



I think that the tests checking the results returned
from cygwin_select should not be negated.

Regards,

Eric Fifer

ChangeLog

	* poll.cc (poll): Fix erroneous negations.


--- poll.cc-	Mon Jul 17 16:52:15 2000
+++ poll.cc	Mon Jul 17 16:53:57 2000
@@ -51,11 +51,11 @@ poll (struct pollfd *fds, unsigned int n
         else
 	  {
             fds[i].revents = 0;
-	    if (!FD_ISSET (fds[i].fd, &read_fds))
+	    if (FD_ISSET (fds[i].fd, &read_fds))
 	      fds[i].revents |= POLLIN;
-	    if (!FD_ISSET (fds[i].fd, &write_fds))
+	    if (FD_ISSET (fds[i].fd, &write_fds))
 	      fds[i].revents |= POLLOUT;
-	    if (!FD_ISSET (fds[i].fd, &except_fds))
+	    if (FD_ISSET (fds[i].fd, &except_fds))
 	      fds[i].revents |= POLLPRI;
 	  }
       }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]