aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-04-02 19:26:16 -0500
committerRob Landley <rob@landley.net>2018-04-02 19:26:16 -0500
commit58aed2b87d1287bfa37b35d6a3692bcb6484d4b2 (patch)
tree9fb3ecaf161d31845985e6971305aeeca0a78ea6 /toys
parent96c0084bca9ef179e6e19fc77d8d67ebc1b8088b (diff)
downloadtoybox-58aed2b87d1287bfa37b35d6a3692bcb6484d4b2.tar.gz
Second argument to inet_ntop() is int, not long. (64 bit big endian systems care.)
Diffstat (limited to 'toys')
-rw-r--r--toys/net/netstat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/net/netstat.c b/toys/net/netstat.c
index 4e5c884e..7d672488 100644
--- a/toys/net/netstat.c
+++ b/toys/net/netstat.c
@@ -275,7 +275,7 @@ static void display_routes(void)
static const unsigned flagarray[] = {
RTF_GATEWAY, RTF_HOST, RTF_REINSTATE, RTF_DYNAMIC, RTF_MODIFIED
};
- unsigned long dest, gate, mask;
+ unsigned dest, gate, mask;
int flags, ref, use, metric, mss, win, irtt;
char *out = toybuf, *flag_val;
char iface[64]={0};
@@ -290,7 +290,7 @@ static void display_routes(void)
while (fgets(toybuf, sizeof(toybuf), fp)) {
char *destip = 0, *gateip = 0, *maskip = 0;
- if (11 != sscanf(toybuf, "%63s%lx%lx%X%d%d%d%lx%d%d%d", iface, &dest,
+ if (11 != sscanf(toybuf, "%63s%x%x%X%d%d%d%x%d%d%d", iface, &dest,
&gate, &flags, &ref, &use, &metric, &mask, &mss, &win, &irtt))
break;