]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: fix warnings from frr_elevate_privs()
authorDavid Lamparter <equinox@opensourcerouting.org>
Fri, 10 Aug 2018 17:55:51 +0000 (19:55 +0200)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 14 Aug 2018 20:02:05 +0000 (20:02 +0000)
Signed-off-by: David Lamparter <equinox@diac24.net>
zebra/kernel_netlink.c
zebra/rtadv.c

index 176ee93cdceda81f6f5458fc5900c9fdb117f345..ef7c26c9dfbf30a9e5d7566c88192180014cf6be 100644 (file)
@@ -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);
index 4f89b5e761cf219f365f3f4f3b3da868a65a4da2..8f2e61c0752c12e8528c8f10ad964d244ce82bf8 100644 (file)
@@ -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;