]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Assert that we never try to fakepoll on sock -1.
authorNick Mathewson <nickm@torproject.org>
Sun, 2 May 2004 20:17:43 +0000 (20:17 +0000)
committerNick Mathewson <nickm@torproject.org>
Sun, 2 May 2004 20:17:43 +0000 (20:17 +0000)
svn:r1774

src/common/fakepoll.c

index 5209bedb481b2f5c7be1cceb221cf2800c5340b3..4fe10cdd3a6e01ca0ea3a2e5652652b5ff851bd7 100644 (file)
@@ -60,6 +60,7 @@ tor_poll(struct pollfd *ufds, unsigned int nfds, int timeout)
         for (idx = 0; idx < nfds; ++idx) {
                 ufds[idx].revents = 0;
                 fd = ufds[idx].fd;
+                assert (fd >= 0);
                 if (fd > maxfd) {
                   maxfd = fd;
 #ifdef MS_WINDOWS