poll: Zero (read|write|expect)fds in bsd_poll()

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2018-12-07 15:27:45 +01:00
parent 4512a3fead
commit ab269f036e

View File

@@ -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 */