diff --git a/libssh/poll.c b/libssh/poll.c index 94063d8c..68e3c41c 100644 --- a/libssh/poll.c +++ b/libssh/poll.c @@ -136,7 +136,7 @@ static int bsd_poll(ssh_pollfd_t *fds, nfds_t nfds, int timeout) { /* compute fd_sets and find largest descriptor */ for (max_fd = 0, i = 0; i < nfds; i++) { - if (fds[i].fd < 0) { + if (fds[i].fd == (socket_t) -1) { continue; }