diff options
Diffstat (limited to 'networking/libiproute/libnetlink.c')
-rw-r--r-- | networking/libiproute/libnetlink.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/libiproute/libnetlink.c b/networking/libiproute/libnetlink.c index d29d035d0..47a055ac0 100644 --- a/networking/libiproute/libnetlink.c +++ b/networking/libiproute/libnetlink.c | |||
@@ -265,7 +265,7 @@ int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, | |||
265 | if (msg.msg_namelen != sizeof(nladdr)) { | 265 | if (msg.msg_namelen != sizeof(nladdr)) { |
266 | bb_error_msg_and_die("sender address length == %d", msg.msg_namelen); | 266 | bb_error_msg_and_die("sender address length == %d", msg.msg_namelen); |
267 | } | 267 | } |
268 | for (h = (struct nlmsghdr*)buf; status >= sizeof(*h); ) { | 268 | for (h = (struct nlmsghdr*)buf; status >= (int)sizeof(*h); ) { |
269 | // int l_err; | 269 | // int l_err; |
270 | int len = h->nlmsg_len; | 270 | int len = h->nlmsg_len; |
271 | int l = len - sizeof(*h); | 271 | int l = len - sizeof(*h); |
@@ -293,7 +293,7 @@ int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, | |||
293 | 293 | ||
294 | if (h->nlmsg_type == NLMSG_ERROR) { | 294 | if (h->nlmsg_type == NLMSG_ERROR) { |
295 | struct nlmsgerr *err = (struct nlmsgerr*)NLMSG_DATA(h); | 295 | struct nlmsgerr *err = (struct nlmsgerr*)NLMSG_DATA(h); |
296 | if (l < sizeof(struct nlmsgerr)) { | 296 | if (l < (int)sizeof(struct nlmsgerr)) { |
297 | bb_error_msg("ERROR truncated"); | 297 | bb_error_msg("ERROR truncated"); |
298 | } else { | 298 | } else { |
299 | errno = - err->error; | 299 | errno = - err->error; |
@@ -336,7 +336,7 @@ int addattr32(struct nlmsghdr *n, int maxlen, int type, uint32_t data) | |||
336 | { | 336 | { |
337 | int len = RTA_LENGTH(4); | 337 | int len = RTA_LENGTH(4); |
338 | struct rtattr *rta; | 338 | struct rtattr *rta; |
339 | if (NLMSG_ALIGN(n->nlmsg_len) + len > maxlen) | 339 | if ((int)(NLMSG_ALIGN(n->nlmsg_len) + len) > maxlen) |
340 | return -1; | 340 | return -1; |
341 | rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len)); | 341 | rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len)); |
342 | rta->rta_type = type; | 342 | rta->rta_type = type; |
@@ -351,7 +351,7 @@ int addattr_l(struct nlmsghdr *n, int maxlen, int type, void *data, int alen) | |||
351 | int len = RTA_LENGTH(alen); | 351 | int len = RTA_LENGTH(alen); |
352 | struct rtattr *rta; | 352 | struct rtattr *rta; |
353 | 353 | ||
354 | if (NLMSG_ALIGN(n->nlmsg_len) + len > maxlen) | 354 | if ((int)(NLMSG_ALIGN(n->nlmsg_len) + len) > maxlen) |
355 | return -1; | 355 | return -1; |
356 | rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len)); | 356 | rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len)); |
357 | rta->rta_type = type; | 357 | rta->rta_type = type; |