Assert that we never try to fakepoll on sock -1.

svn:r1774
This commit is contained in:
Nick Mathewson 2004-05-02 20:17:43 +00:00
parent a16ec39800
commit a187d3e0b6

View File

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