aboutsummaryrefslogtreecommitdiffstats
path: root/src/servers/master.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-08-05 13:29:31 +0200
committerMattias Andrée <maandree@kth.se>2016-08-05 13:29:31 +0200
commit28ef2f4a5fec9bedf307ae4b5ac63c64a85299e3 (patch)
tree314309d3893a4ef78f0c478e65339f96dcc4304f /src/servers/master.c
parentFix memory leaks (diff)
downloadcoopgammad-28ef2f4a5fec9bedf307ae4b5ac63c64a85299e3.tar.gz
coopgammad-28ef2f4a5fec9bedf307ae4b5ac63c64a85299e3.tar.bz2
coopgammad-28ef2f4a5fec9bedf307ae4b5ac63c64a85299e3.tar.xz
Fix reading of uninitialised value
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/servers/master.c')
-rw-r--r--src/servers/master.c2
1 files changed, 2 insertions, 0 deletions
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)
{