diff options
-rw-r--r-- | bgpd/bgp_aspath.c | 11 | ||||
-rw-r--r-- | bgpd/bgp_mpath.c | 2 | ||||
-rw-r--r-- | bgpd/bgp_open.c | 3 | ||||
-rw-r--r-- | bgpd/bgp_packet.c | 2 | ||||
-rw-r--r-- | bgpd/bgp_route.c | 3 | ||||
-rw-r--r-- | bgpd/bgp_updgrp_packet.c | 4 | ||||
-rw-r--r-- | bgpd/bgp_vty.c | 2 |
7 files changed, 8 insertions, 19 deletions
diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c index f4d7c4aad..031f71c30 100644 --- a/bgpd/bgp_aspath.c +++ b/bgpd/bgp_aspath.c @@ -1045,20 +1045,15 @@ struct aspath * aspath_aggregate (struct aspath *as1, struct aspath *as2) { int i; - int minlen; - int match; + int minlen = 0; + int match = 0; int from; struct assegment *seg1 = as1->segments; struct assegment *seg2 = as2->segments; struct aspath *aspath = NULL; - struct assegment *asset; + struct assegment *asset = NULL; struct assegment *prevseg = NULL; - match = 0; - minlen = 0; - aspath = NULL; - asset = NULL; - /* First of all check common leading sequence. */ while (seg1 && seg2) { diff --git a/bgpd/bgp_mpath.c b/bgpd/bgp_mpath.c index 852d86329..8397177f8 100644 --- a/bgpd/bgp_mpath.c +++ b/bgpd/bgp_mpath.c @@ -564,7 +564,7 @@ bgp_info_mpath_update (struct bgp_node *rn, struct bgp_info *new_best, bgp_info_nexthop_cmp (prev_mpath, new_mpath)) { if (new_mpath == next_mpath) - next_mpath = bgp_info_mpath_next (new_mpath); + bgp_info_mpath_next (new_mpath); bgp_info_mpath_dequeue (new_mpath); bgp_info_mpath_enqueue (prev_mpath, new_mpath); diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c index 0adde3f89..18d135997 100644 --- a/bgpd/bgp_open.c +++ b/bgpd/bgp_open.c @@ -993,13 +993,12 @@ end: int bgp_open_option_parse (struct peer *peer, u_char length, int *mp_capability) { - int ret; + int ret = 0; u_char *error; u_char error_data[BGP_MAX_PACKET_SIZE]; struct stream *s = BGP_INPUT(peer); size_t end = stream_get_getp (s) + length; - ret = 0; error = error_data; if (bgp_debug_neighbor_events(peer)) diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 933a50485..08082161f 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -2348,7 +2348,7 @@ bgp_read (struct thread *thread) goto done; /* Get size and type again. */ - size = stream_getw_from (peer->ibuf, BGP_MARKER_SIZE); + (void)stream_getw_from (peer->ibuf, BGP_MARKER_SIZE); type = stream_getc_from (peer->ibuf, BGP_MARKER_SIZE + 2); /* BGP packet dump function. */ diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index a0dd59183..c8781a85b 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -1542,7 +1542,6 @@ bgp_best_selection (struct bgp *bgp, struct bgp_node *rn, continue; new_select = ri1; - old_select = CHECK_FLAG (ri1->flags, BGP_INFO_SELECTED) ? ri1 : NULL; if (ri1->next) { for (ri2 = ri1->next; ri2; ri2 = ri2->next) @@ -1561,8 +1560,6 @@ bgp_best_selection (struct bgp *bgp, struct bgp_node *rn, || aspath_cmp_left_confed (ri1->attr->aspath, ri2->attr->aspath)) { - if (CHECK_FLAG (ri2->flags, BGP_INFO_SELECTED)) - old_select = ri2; if (bgp_info_cmp (bgp, ri2, new_select, &paths_eq, mpath_cfg, debug, pfx_buf)) { diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c index 320eef21d..9577d1b19 100644 --- a/bgpd/bgp_updgrp_packet.c +++ b/bgpd/bgp_updgrp_packet.c @@ -1048,7 +1048,7 @@ subgroup_default_withdraw_packet (struct update_subgroup *subgrp) unsigned long attrlen_pos = 0; unsigned long cp; bgp_size_t unfeasible_len; - bgp_size_t total_attr_len; + bgp_size_t total_attr_len = 0; size_t mp_start = 0; size_t mplen_pos = 0; afi_t afi; @@ -1070,8 +1070,6 @@ subgroup_default_withdraw_packet (struct update_subgroup *subgrp) str2prefix ("::/0", &p); #endif /* HAVE_IPV6 */ - total_attr_len = 0; - if (bgp_debug_update(NULL, &p, subgrp->update_group, 0)) { char buf[INET6_BUFSIZ]; diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index bde127350..ad04308f0 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -393,7 +393,7 @@ bgp_clear (struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi, { if (stype == BGP_CLEAR_SOFT_NONE) { - ret = peer_clear (peer, NULL); + peer_clear (peer, NULL); continue; } |