From 327f550669a80d72f36bc9e4de619c163aa46eff Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 29 Nov 2013 16:45:45 +0100 Subject: Use unsigned printf/scanf conversion where more appropriate Signed-off-by: Denys Vlasenko --- miscutils/hdparm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'miscutils/hdparm.c') diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index 69726ae72..f0e9c9d75 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c @@ -465,14 +465,14 @@ static void on_off(int value) static void print_flag_on_off(int get_arg, const char *s, unsigned long arg) { if (get_arg) { - printf(" setting %s to %ld", s, arg); + printf(" setting %s to %lu", s, arg); on_off(arg); } } static void print_value_on_off(const char *str, unsigned long argp) { - printf(" %s\t= %2ld", str, argp); + printf(" %s\t= %2lu", str, argp); on_off(argp != 0); } @@ -1509,7 +1509,7 @@ static void bus_state_value(unsigned value) else if (value == BUSSTATE_TRISTATE) printf(" (tristate)\n"); else - printf(" (unknown: %d)\n", value); + printf(" (unknown: %u)\n", value); } #endif @@ -1589,7 +1589,7 @@ static void interpret_xfermode(unsigned xfermode) static void print_flag(int flag, const char *s, unsigned long value) { if (flag) - printf(" setting %s to %ld\n", s, value); + printf(" setting %s to %lu\n", s, value); } static void process_dev(char *devname) -- cgit v1.2.3