mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 14:42:06 +00:00
Merge pull request #1038 from donaldsharp/zserv
zebra: Fix compiler warnings
This commit is contained in:
commit
40d55b54c6
@ -940,7 +940,7 @@ int zapi_route_encode(u_char cmd, struct stream *s, struct zapi_route *api)
|
||||
api->nexthop_num = MULTIPATH_NUM;
|
||||
}
|
||||
|
||||
stream_putc(s, api->nexthop_num);
|
||||
stream_putw(s, api->nexthop_num);
|
||||
|
||||
for (i = 0; i < api->nexthop_num; i++) {
|
||||
api_nh = &api->nexthops[i];
|
||||
@ -1047,7 +1047,7 @@ int zapi_route_decode(struct stream *s, struct zapi_route *api)
|
||||
|
||||
/* Nexthops. */
|
||||
if (CHECK_FLAG(api->message, ZAPI_MESSAGE_NEXTHOP)) {
|
||||
api->nexthop_num = stream_getc(s);
|
||||
api->nexthop_num = stream_getw(s);
|
||||
if (api->nexthop_num > MULTIPATH_NUM) {
|
||||
zlog_warn("%s: invalid number of nexthops (%u)",
|
||||
__func__, api->nexthop_num);
|
||||
|
@ -242,7 +242,7 @@ struct zapi_route {
|
||||
struct prefix prefix;
|
||||
struct prefix_ipv6 src_prefix;
|
||||
|
||||
u_char nexthop_num;
|
||||
u_int16_t nexthop_num;
|
||||
struct zapi_nexthop nexthops[MULTIPATH_NUM];
|
||||
|
||||
u_char distance;
|
||||
|
@ -1049,7 +1049,7 @@ static int zread_route_add(struct zserv *client, u_short length,
|
||||
afi_t afi;
|
||||
struct prefix_ipv6 *src_p = NULL;
|
||||
struct route_entry *re;
|
||||
struct nexthop *nexthop;
|
||||
struct nexthop *nexthop = NULL;
|
||||
int i, ret;
|
||||
|
||||
s = client->ibuf;
|
||||
@ -1364,7 +1364,7 @@ static int zread_ipv4_route_ipv6_nexthop_add(struct zserv *client,
|
||||
static unsigned int ifindices[MULTIPATH_NUM];
|
||||
int ret;
|
||||
static mpls_label_t labels[MULTIPATH_NUM];
|
||||
enum lsp_types_t label_type;
|
||||
enum lsp_types_t label_type = ZEBRA_LSP_NONE;
|
||||
mpls_label_t label;
|
||||
struct nexthop *nexthop;
|
||||
|
||||
@ -1513,7 +1513,7 @@ static int zread_ipv6_add(struct zserv *client, u_short length,
|
||||
static unsigned int ifindices[MULTIPATH_NUM];
|
||||
int ret;
|
||||
static mpls_label_t labels[MULTIPATH_NUM];
|
||||
enum lsp_types_t label_type;
|
||||
enum lsp_types_t label_type = ZEBRA_LSP_NONE;
|
||||
mpls_label_t label;
|
||||
struct nexthop *nexthop;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user