From 9d4042a17108facf2223d08d730d335a16a55f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Tvrd=C3=ADk?= Date: Wed, 30 Mar 2016 16:56:10 +0200 Subject: [PATCH] io.c: init some uninitialized variables --- sysdep/unix/io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index 8a431481..8c84af61 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -1205,7 +1205,7 @@ sk_setup(sock *s) if (s->iface) { #ifdef SO_BINDTODEVICE - struct ifreq ifr; + struct ifreq ifr = {}; strcpy(ifr.ifr_name, s->iface->name); if (setsockopt(s->fd, SOL_SOCKET, SO_BINDTODEVICE, &ifr, sizeof(ifr)) < 0) ERR("SO_BINDTODEVICE"); @@ -1567,7 +1567,7 @@ sk_sendmsg(sock *s) { struct iovec iov = {s->tbuf, s->tpos - s->tbuf}; byte cmsg_buf[CMSG_TX_SPACE]; - sockaddr dst; + sockaddr dst = {}; sockaddr_fill(&dst, s->af, s->daddr, s->iface, s->dport);