aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-12-07 15:27:45 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-01-09 15:43:39 +0100
commitab269f036e5a7594ef250bd5ebf74e382718e43d (patch)
treec0c72af5ff7eac71051c2cdf6bac08e150261851
parent4512a3feada80e236de1c1c09896e0ad10e2205a (diff)
downloadlibssh-ab269f036e5a7594ef250bd5ebf74e382718e43d.tar.gz
libssh-ab269f036e5a7594ef250bd5ebf74e382718e43d.tar.xz
libssh-ab269f036e5a7594ef250bd5ebf74e382718e43d.zip
poll: Zero (read|write|expect)fds in bsd_poll()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--src/poll.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/poll.c b/src/poll.c
index aa2a0821..e211b338 100644
--- a/src/poll.c
+++ b/src/poll.c
@@ -170,8 +170,11 @@ static int bsd_poll(ssh_pollfd_t *fds, nfds_t nfds, int timeout)
return -1;
}
+ ZERO_STRUCT(readfds);
FD_ZERO(&readfds);
+ ZERO_STRUCT(writefds);
FD_ZERO(&writefds);
+ ZERO_STRUCT(exceptfds);
FD_ZERO(&exceptfds);
/* compute fd_sets and find largest descriptor */