Skip to content

Commit

Permalink
bgpd: fix failing to compile on 32 bit systems
Browse files Browse the repository at this point in the history
-Werror=sign-compare is failing with signed/unsigned usage
in the conditional expression.

Fixes: #1593
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
  • Loading branch information
donaldsharp committed Jan 4, 2018
1 parent 3cace9d commit 8356e9b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -5068,9 +5068,10 @@ DEFPY(bgp_network,
}

return bgp_static_set(vty, no, address_str ? addr_prefix_str:prefix_str,
AFI_IP, bgp_node_safi(vty),
map_name, backdoor?1:0,
label_index ? label_index:BGP_INVALID_LABEL_INDEX);
AFI_IP, bgp_node_safi(vty),
map_name, backdoor?1:0,
label_index ?
(uint32_t)label_index : BGP_INVALID_LABEL_INDEX);
}

DEFPY(ipv6_bgp_network,
Expand All @@ -5086,8 +5087,9 @@ DEFPY(ipv6_bgp_network,
"Label index value\n")
{
return bgp_static_set(vty, no, prefix_str, AFI_IP6,
bgp_node_safi(vty), map_name, 0,
label_index ? label_index:BGP_INVALID_LABEL_INDEX);
bgp_node_safi(vty), map_name, 0,
label_index ?
(uint32_t)label_index : BGP_INVALID_LABEL_INDEX);
}

/* Aggreagete address:
Expand Down

0 comments on commit 8356e9b

Please sign in to comment.