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)
{
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);
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))
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. */
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)
|| 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))
{
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;
str2prefix ("::/0", &p);
#endif /* HAVE_IPV6 */
- total_attr_len = 0;
-
if (bgp_debug_update(NULL, &p, subgrp->update_group, 0))
{
char buf[INET6_BUFSIZ];
{
if (stype == BGP_CLEAR_SOFT_NONE)
{
- ret = peer_clear (peer, NULL);
+ peer_clear (peer, NULL);
continue;
}