summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/fakepoll.c1
1 files changed, 1 insertions, 0 deletions
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