From 28ef2f4a5fec9bedf307ae4b5ac63c64a85299e3 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 5 Aug 2016 13:29:31 +0200 Subject: Fix reading of uninitialised value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/servers/master.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/servers/master.c') diff --git a/src/servers/master.c b/src/servers/master.c index 094d853..acd0f6b 100644 --- a/src/servers/master.c +++ b/src/servers/master.c @@ -339,11 +339,13 @@ int main_loop(void) for (j = 0, i = 0; j < connections_used; j++) if (connections[j] >= 0) { + fds[i].revents = 0; if (ring_have_more(outbound + j)) fds[(size_t)i++ + j].events |= POLLOUT; else fds[(size_t)i++ + j].events &= ~POLLOUT; } + fds[i].revents = 0; if (poll(fds, fdn, -1) < 0) { -- cgit v1.2.3-70-g09d2