diff options
author | Denys Vlasenko | 2013-11-29 16:45:45 +0100 |
---|---|---|
committer | Denys Vlasenko | 2013-11-29 16:45:45 +0100 |
commit | 327f550669a80d72f36bc9e4de619c163aa46eff (patch) | |
tree | d304092aeb06539085be1385ab9298876c414b44 /networking/netstat.c | |
parent | 9b2a9f0210f13f1c59c0b954c4aa0eeb0a66efd1 (diff) | |
download | busybox-327f550669a80d72f36bc9e4de619c163aa46eff.zip busybox-327f550669a80d72f36bc9e4de619c163aa46eff.tar.gz |
Use unsigned printf/scanf conversion where more appropriate
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/netstat.c')
-rw-r--r-- | networking/netstat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/netstat.c b/networking/netstat.c index c0c6ba5..f80b845 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, ¶m->local_port, rem_addr, ¶m->rem_port, ¶m->state, ¶m->txq, ¶m->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 ); |