diff options
author | Colin Watson <cjwatson@debian.org> | 2010-01-01 17:15:23 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2010-01-01 17:15:23 +0000 |
commit | 99b402ea4c8457b0a3cafff37f5b3410a8dc6476 (patch) | |
tree | 1d24ce54c9981ea8cbb4c5a9309964a0e4c4b320 /openbsd-compat/bsd-poll.c | |
parent | 87552344215a38d3a2b0d4d63dc151e05978bbe1 (diff) | |
parent | 54af7a4ae8d455791a631bdfaade4b64436ae16a (diff) |
import openssh-5.2p1-gsskex-all-20090726.patch
Diffstat (limited to 'openbsd-compat/bsd-poll.c')
-rw-r--r-- | openbsd-compat/bsd-poll.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/openbsd-compat/bsd-poll.c b/openbsd-compat/bsd-poll.c index 284db3a1f..f899d7a24 100644 --- a/openbsd-compat/bsd-poll.c +++ b/openbsd-compat/bsd-poll.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: bsd-poll.c,v 1.3 2008/04/04 05:16:36 djm Exp $ */ | 1 | /* $Id: bsd-poll.c,v 1.4 2008/08/29 21:32:38 dtucker Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2004, 2005, 2007 Darren Tucker (dtucker at zip com au). | 4 | * Copyright (c) 2004, 2005, 2007 Darren Tucker (dtucker at zip com au). |
@@ -46,11 +46,12 @@ poll(struct pollfd *fds, nfds_t nfds, int timeout) | |||
46 | struct timeval tv, *tvp = NULL; | 46 | struct timeval tv, *tvp = NULL; |
47 | 47 | ||
48 | for (i = 0; i < nfds; i++) { | 48 | for (i = 0; i < nfds; i++) { |
49 | fd = fds[i].fd; | ||
49 | if (fd >= FD_SETSIZE) { | 50 | if (fd >= FD_SETSIZE) { |
50 | errno = EINVAL; | 51 | errno = EINVAL; |
51 | return -1; | 52 | return -1; |
52 | } | 53 | } |
53 | maxfd = MAX(maxfd, fds[i].fd); | 54 | maxfd = MAX(maxfd, fd); |
54 | } | 55 | } |
55 | 56 | ||
56 | nmemb = howmany(maxfd + 1 , NFDBITS); | 57 | nmemb = howmany(maxfd + 1 , NFDBITS); |