From: David Lamparter Date: Fri, 10 Aug 2018 17:55:51 +0000 (+0200) Subject: zebra: fix warnings from frr_elevate_privs() X-Git-Tag: frr-6.1-dev~61^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=8d2dcc85dd8299e807362787b2725bd33fac4694;p=matthieu%2Ffrr.git zebra: fix warnings from frr_elevate_privs() Signed-off-by: David Lamparter --- diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c index 176ee93cdc..ef7c26c9df 100644 --- a/zebra/kernel_netlink.c +++ b/zebra/kernel_netlink.c @@ -916,11 +916,11 @@ int netlink_talk(int (*filter)(struct nlmsghdr *, ns_id_t, int startup), struct nlmsghdr *n, struct nlsock *nl, struct zebra_ns *zns, int startup) { - int status; + int status = 0; struct sockaddr_nl snl; struct iovec iov; struct msghdr msg; - int save_errno; + int save_errno = 0; memset(&snl, 0, sizeof snl); memset(&iov, 0, sizeof iov); diff --git a/zebra/rtadv.c b/zebra/rtadv.c index 4f89b5e761..8f2e61c075 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -626,7 +626,7 @@ static int rtadv_read(struct thread *thread) static int rtadv_make_socket(ns_id_t ns_id) { - int sock; + int sock = -1; int ret = 0; struct icmp6_filter filter;