]> git.puffer.fish Git - matthieu/frr.git/commitdiff
scan-build: fix warning
authorVincent JARDIN <vincent.jardin@6wind.com>
Wed, 27 Sep 2017 22:18:36 +0000 (00:18 +0200)
committerVincent JARDIN <vincent.jardin@6wind.com>
Mon, 2 Oct 2017 07:14:03 +0000 (09:14 +0200)
Do not change the implementation, just fix scan-build/clang warning.

babeld/neighbour.c
bgpd/bgp_route.c

index 5bf7e06fae8e2bf0d9750f30b37b80eb7c270dbd..48a32c4a9c39c658d86ee6564958475685ed20cf 100644 (file)
@@ -165,7 +165,6 @@ update_neighbour(struct neighbour *neigh, int hello, int hello_interval)
     if(missed_hellos > 0) {
         neigh->reach >>= missed_hellos;
         neigh->hello_seqno = seqno_plus(neigh->hello_seqno, missed_hellos);
-        missed_hellos = 0;
         rc = 1;
     }
 
index b9f23a387e5c14e0d18c06f01d69d7df27794a40..3307f8608814548ed35d2cf4fe16334bbeeeb1f3 100644 (file)
@@ -391,7 +391,7 @@ static int bgp_info_cmp(struct bgp *bgp, struct bgp_info *new,
        int exist_cluster;
        int internal_as_route;
        int confed_as_route;
-       int ret;
+       int ret = 0;
        char new_buf[PATH_ADDPATH_STR_BUFFER];
        char exist_buf[PATH_ADDPATH_STR_BUFFER];
        u_int32_t new_mm_seq;
@@ -488,8 +488,6 @@ static int bgp_info_cmp(struct bgp *bgp, struct bgp_info *new,
        }
 
        /* 1. Weight check. */
-       new_weight = exist_weight = 0;
-
        new_weight = newattr->weight;
        exist_weight = existattr->weight;