aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-11-29 16:45:45 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2013-11-29 16:45:45 +0100
commit327f550669a80d72f36bc9e4de619c163aa46eff (patch)
treed304092aeb06539085be1385ab9298876c414b44 /networking
parent9b2a9f0210f13f1c59c0b954c4aa0eeb0a66efd1 (diff)
downloadbusybox-327f550669a80d72f36bc9e4de619c163aa46eff.tar.gz
Use unsigned printf/scanf conversion where more appropriate
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r--networking/arp.c4
-rw-r--r--networking/netstat.c8
-rw-r--r--networking/pscan.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/networking/arp.c b/networking/arp.c
index 40d244116..e79b1b6a1 100644
--- a/networking/arp.c
+++ b/networking/arp.c
@@ -459,12 +459,12 @@ static int arp_show(char *name)
arp_disp(hostname, ip, type, flags, hwa, mask, dev);
}
if (option_mask32 & ARP_OPT_v)
- printf("Entries: %d\tSkipped: %d\tFound: %d\n",
+ printf("Entries: %u\tSkipped: %u\tFound: %u\n",
entries, entries - shown, shown);
if (!shown) {
if (hw_set || host || device[0])
- printf("No match found in %d entries\n", entries);
+ printf("No match found in %u entries\n", entries);
}
if (ENABLE_FEATURE_CLEAN_UP) {
free((char*)host);
diff --git a/networking/netstat.c b/networking/netstat.c
index c0c6ba501..f80b845bc 100644
--- a/networking/netstat.c
+++ b/networking/netstat.c
@@ -125,10 +125,10 @@ typedef enum {
*/
#define ADDR_WIDE 51 /* INET6_ADDRSTRLEN + 5 for the port number */
#if ENABLE_FEATURE_NETSTAT_WIDE
-# define FMT_NET_CONN_DATA "%s %6ld %6ld %-*s %-*s %-12s"
+# define FMT_NET_CONN_DATA "%s %6lu %6lu %-*s %-*s %-12s"
# define FMT_NET_CONN_HEADER "\nProto Recv-Q Send-Q %-*s %-*s State %s\n"
#else
-# define FMT_NET_CONN_DATA "%s %6ld %6ld %-23s %-23s %-12s"
+# define FMT_NET_CONN_DATA "%s %6lu %6lu %-23s %-23s %-12s"
# define FMT_NET_CONN_HEADER "\nProto Recv-Q Send-Q %-23s %-23s State %s\n"
#endif
@@ -403,7 +403,7 @@ static int scan_inet_proc_line(struct inet_params *param, char *line)
"%*d: %32[0-9A-Fa-f]:%X "
"%32[0-9A-Fa-f]:%X %X "
"%lX:%lX %*X:%*X "
- "%*X %d %*d %ld ",
+ "%*X %d %*d %lu ",
local_addr, &param->local_port,
rem_addr, &param->rem_port, &param->state,
&param->txq, &param->rxq,
@@ -611,7 +611,7 @@ static int FAST_FUNC unix_do_one(char *line)
strcat(ss_flags, "N ");
strcat(ss_flags, "]");
- printf("%-5s %-6ld %-11s %-10s %-13s %6lu ",
+ printf("%-5s %-6lu %-11s %-10s %-13s %6lu ",
ss_proto, refcnt, ss_flags, ss_type, ss_state, inode
);
diff --git a/networking/pscan.c b/networking/pscan.c
index 28005ad57..72ed8cdb5 100644
--- a/networking/pscan.c
+++ b/networking/pscan.c
@@ -157,7 +157,7 @@ int pscan_main(int argc UNUSED_PARAM, char **argv)
}
if (ENABLE_FEATURE_CLEAN_UP) free(lsap);
- printf("%d closed, %d open, %d timed out (or blocked) ports\n",
+ printf("%u closed, %u open, %u timed out (or blocked) ports\n",
closed_ports,
open_ports,
nports - (closed_ports + open_ports));