From 04d14c8be13f7218c0bc4279a6ec178276588e3e Mon Sep 17 00:00:00 2001 From: Vincent JARDIN Date: Thu, 28 Sep 2017 00:18:36 +0200 Subject: [PATCH] scan-build: fix warning Do not change the implementation, just fix scan-build/clang warning. --- babeld/neighbour.c | 1 - bgpd/bgp_route.c | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/babeld/neighbour.c b/babeld/neighbour.c index 5bf7e06fae..48a32c4a9c 100644 --- a/babeld/neighbour.c +++ b/babeld/neighbour.c @@ -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; } diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index b9f23a387e..3307f86088 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -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; -- 2.39.5