Use unsigned printf/scanf conversion where more appropriate
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -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);
|
||||
|
@@ -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
|
||||
);
|
||||
|
||||
|
@@ -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));
|
||||
|
Reference in New Issue
Block a user