zebra: *addattr should use size_t len args, quell signed v unsigned warning
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index e4505de..42cb9d4 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -1328,7 +1328,7 @@
/* Utility function comes from iproute2.
Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> */
int
-addattr_l (struct nlmsghdr *n, size_t maxlen, int type, void *data, int alen)
+addattr_l (struct nlmsghdr *n, size_t maxlen, int type, void *data, size_t alen)
{
size_t len;
struct rtattr *rta;
@@ -1348,9 +1348,10 @@
}
int
-rta_addattr_l (struct rtattr *rta, int maxlen, int type, void *data, int alen)
+rta_addattr_l (struct rtattr *rta, size_t maxlen, int type, void *data,
+ size_t alen)
{
- int len;
+ size_t len;
struct rtattr *subrta;
len = RTA_LENGTH (alen);
diff --git a/zebra/rt_netlink.h b/zebra/rt_netlink.h
index 63fbbe7..9fc7001 100644
--- a/zebra/rt_netlink.h
+++ b/zebra/rt_netlink.h
@@ -30,10 +30,10 @@
extern int
addattr32 (struct nlmsghdr *n, size_t maxlen, int type, int data);
extern int
-addattr_l (struct nlmsghdr *n, size_t maxlen, int type, void *data, int alen);
+addattr_l (struct nlmsghdr *n, size_t maxlen, int type, void *data, size_t alen);
extern int
-rta_addattr_l (struct rtattr *rta, int maxlen, int type, void *data, int alen);
+rta_addattr_l (struct rtattr *rta, size_t maxlen, int type, void *data, size_t alen);
extern const char *
nl_msg_type_to_str (uint16_t msg_type);
diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c
index 0173000..96e897b 100644
--- a/zebra/zebra_fpm_netlink.c
+++ b/zebra/zebra_fpm_netlink.c
@@ -322,7 +322,7 @@
netlink_route_info_encode (netlink_route_info_t *ri, char *in_buf,
size_t in_buf_len)
{
- int bytelen;
+ size_t bytelen;
int nexthop_num = 0;
size_t buf_offset;
netlink_nh_info_t *nhi;