diff options
Diffstat (limited to 'networking/libiproute/iproute.c')
-rw-r--r-- | networking/libiproute/iproute.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index 30d455602..bf6f95f61 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c | |||
@@ -15,12 +15,6 @@ | |||
15 | 15 | ||
16 | #include "libbb.h" | 16 | #include "libbb.h" |
17 | 17 | ||
18 | #include <sys/socket.h> | ||
19 | |||
20 | #include <string.h> | ||
21 | #include <fcntl.h> | ||
22 | #include <unistd.h> | ||
23 | |||
24 | #include "rt_names.h" | 18 | #include "rt_names.h" |
25 | #include "utils.h" | 19 | #include "utils.h" |
26 | #include "ip_common.h" | 20 | #include "ip_common.h" |
@@ -248,7 +242,7 @@ static int print_route(struct sockaddr_nl *who ATTRIBUTE_UNUSED, | |||
248 | abuf, sizeof(abuf))); | 242 | abuf, sizeof(abuf))); |
249 | } | 243 | } |
250 | if (tb[RTA_PRIORITY]) { | 244 | if (tb[RTA_PRIORITY]) { |
251 | fprintf(fp, " metric %d ", *(__u32*)RTA_DATA(tb[RTA_PRIORITY])); | 245 | fprintf(fp, " metric %d ", *(uint32_t*)RTA_DATA(tb[RTA_PRIORITY])); |
252 | } | 246 | } |
253 | if (r->rtm_family == AF_INET6) { | 247 | if (r->rtm_family == AF_INET6) { |
254 | struct rta_cacheinfo *ci = NULL; | 248 | struct rta_cacheinfo *ci = NULL; |
@@ -405,7 +399,8 @@ static int iproute_modify(int cmd, unsigned flags, int argc, char **argv) | |||
405 | ll_init_map(&rth); | 399 | ll_init_map(&rth); |
406 | 400 | ||
407 | if (d) { | 401 | if (d) { |
408 | if ((idx = ll_name_to_index(d)) == 0) { | 402 | idx = ll_name_to_index(d); |
403 | if (idx == 0) { | ||
409 | bb_error_msg("cannot find device \"%s\"", d); | 404 | bb_error_msg("cannot find device \"%s\"", d); |
410 | return -1; | 405 | return -1; |
411 | } | 406 | } |