summaryrefslogtreecommitdiff
path: root/networking/libiproute/iproute.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-12-31 18:57:37 +0000
committerDenis Vlasenko2006-12-31 18:57:37 +0000
commit98ee06d3d46aa7f89c204681c7075b53300a6a6e (patch)
tree0f5cafbb22cd83fb73e024acba658c7a51582951 /networking/libiproute/iproute.c
parent806116b23407bdf95f22646f11f50b1d14e1cfc2 (diff)
downloadbusybox-98ee06d3d46aa7f89c204681c7075b53300a6a6e.zip
busybox-98ee06d3d46aa7f89c204681c7075b53300a6a6e.tar.gz
stop using __u32 etc. uint32_t is there for a reason
Diffstat (limited to 'networking/libiproute/iproute.c')
-rw-r--r--networking/libiproute/iproute.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
index 30d4556..bf6f95f 100644
--- a/networking/libiproute/iproute.c
+++ b/networking/libiproute/iproute.c
@@ -15,12 +15,6 @@
#include "libbb.h"
-#include <sys/socket.h>
-
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-
#include "rt_names.h"
#include "utils.h"
#include "ip_common.h"
@@ -248,7 +242,7 @@ static int print_route(struct sockaddr_nl *who ATTRIBUTE_UNUSED,
abuf, sizeof(abuf)));
}
if (tb[RTA_PRIORITY]) {
- fprintf(fp, " metric %d ", *(__u32*)RTA_DATA(tb[RTA_PRIORITY]));
+ fprintf(fp, " metric %d ", *(uint32_t*)RTA_DATA(tb[RTA_PRIORITY]));
}
if (r->rtm_family == AF_INET6) {
struct rta_cacheinfo *ci = NULL;
@@ -405,7 +399,8 @@ static int iproute_modify(int cmd, unsigned flags, int argc, char **argv)
ll_init_map(&rth);
if (d) {
- if ((idx = ll_name_to_index(d)) == 0) {
+ idx = ll_name_to_index(d);
+ if (idx == 0) {
bb_error_msg("cannot find device \"%s\"", d);
return -1;
}