zebra: Fix comparison warning

It's possible to have a comparison where
MULTIPATH_NUM is greater than the size of
data that a u_char supports for nexthop_num

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2016-06-08 15:30:48 -04:00
parent fac76f9cf7
commit 4f87aceb78
2 changed files with 2 additions and 2 deletions

View File

@ -1161,7 +1161,7 @@ zread_interface_delete (struct zserv *client, u_short length, struct zebra_vrf *
}
void
zserv_nexthop_num_warn (const char *caller, const struct prefix *p, const u_char nexthop_num)
zserv_nexthop_num_warn (const char *caller, const struct prefix *p, const unsigned int nexthop_num)
{
if (nexthop_num > MULTIPATH_NUM)
{

View File

@ -168,7 +168,7 @@ extern int zsend_interface_vrf_update (struct zserv *, struct interface *,
extern pid_t pid;
extern void zserv_create_header(struct stream *s, uint16_t cmd, vrf_id_t vrf_id);
extern void zserv_nexthop_num_warn(const char *, const struct prefix *, const u_char);
extern void zserv_nexthop_num_warn(const char *, const struct prefix *, const unsigned int);
extern int zebra_server_send_message(struct zserv *client);
#endif /* _ZEBRA_ZEBRA_H */