From a187d3e0b6329bd70b9823bd2d5489c8aaccf08e Mon Sep 17 00:00:00 2001
From: Nick Mathewson <nickm@torproject.org>
Date: Sun, 2 May 2004 20:17:43 +0000
Subject: [PATCH] Assert that we never try to fakepoll on sock -1.

svn:r1774
---
 src/common/fakepoll.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/common/fakepoll.c b/src/common/fakepoll.c
index 5209bedb48..4fe10cdd3a 100644
--- a/src/common/fakepoll.c
+++ b/src/common/fakepoll.c
@@ -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
-- 
GitLab