zebra: use unsigned args for *addattr

[based on a patch by Paul Jakma changing it to size_t]

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
David Lamparter 2016-10-11 18:17:28 +02:00 committed by Donald Sharp
parent db7d7ba4e1
commit c7450f9a8b
3 changed files with 6 additions and 5 deletions

View File

@ -307,7 +307,8 @@ netlink_parse_rtattr (struct rtattr **tb, int max, struct rtattr *rta,
}
int
addattr_l (struct nlmsghdr *n, unsigned int maxlen, int type, void *data, int alen)
addattr_l (struct nlmsghdr *n, unsigned int maxlen, int type,
void *data, unsigned int alen)
{
int len;
struct rtattr *rta;
@ -328,7 +329,7 @@ addattr_l (struct nlmsghdr *n, unsigned int maxlen, int type, void *data, int al
int
rta_addattr_l (struct rtattr *rta, unsigned int maxlen, int type,
void *data, int alen)
void *data, unsigned int alen)
{
unsigned int len;
struct rtattr *subrta;

View File

@ -29,9 +29,9 @@
extern void netlink_parse_rtattr (struct rtattr **tb, int max,
struct rtattr *rta, int len);
extern int addattr_l (struct nlmsghdr *n, unsigned int maxlen,
int type, void *data, int alen);
int type, void *data, unsigned int alen);
extern int rta_addattr_l (struct rtattr *rta, unsigned int maxlen,
int type, void *data, int alen);
int type, void *data, unsigned int alen);
extern int addattr32 (struct nlmsghdr *n, unsigned int maxlen,
int type, int data);
extern struct rtattr *addattr_nest(struct nlmsghdr *n, int maxlen, int type);

View File

@ -323,7 +323,7 @@ static int
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;