]> andersk Git - openssh.git/blobdiff - openbsd-compat/bsd-poll.c
- halex@cvs.openbsd.org 2009/11/22 13:18:00
[openssh.git] / openbsd-compat / bsd-poll.c
index a3654952eeef4ce70e90896a53c8c4d71cefcd65..970c3b348ba86d8bbf319dd0d4c802467f92edad 100644 (file)
@@ -46,11 +46,12 @@ poll(struct pollfd *fds, nfds_t nfds, int timeout)
        struct timeval tv, *tvp = NULL;
 
        for (i = 0; i < nfds; i++) {
+               fd = fds[i].fd;
                if (fd >= FD_SETSIZE) {
                        errno = EINVAL;
                        return -1;
                }
-               maxfd = MAX(maxfd, fds[i].fd);
+               maxfd = MAX(maxfd, fd);
        }
 
        nmemb = howmany(maxfd + 1 , NFDBITS);
This page took 0.050817 seconds and 4 git commands to generate.