diff mbox series

[2/2] iw: scan: fix some format string warnings found by clang

Message ID 20200210081354.10390-2-markus.theil@tu-ilmenau.de
State New
Headers show
Series None | expand

Commit Message

Markus Theil Feb. 10, 2020, 8:13 a.m. UTC
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 scan.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/scan.c b/scan.c
index 7155cdf..98c5c10 100644
--- a/scan.c
+++ b/scan.c
@@ -1131,10 +1131,10 @@  static void print_interworking(const uint8_t type, uint8_t len,
 		printf("\t\tVenue Type: %i\n", (int)(data[2]));
 	}
 	if (len == 9)
-		printf("\t\tHESSID: %02hx:%02hx:%02hx:%02hx:%02hx:%02hx\n",
+		printf("\t\tHESSID: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx\n",
 		       data[3], data[4], data[5], data[6], data[7], data[8]);
 	else if (len == 7)
-		printf("\t\tHESSID: %02hx:%02hx:%02hx:%02hx:%02hx:%02hx\n",
+		printf("\t\tHESSID: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx\n",
 		       data[1], data[2], data[3], data[4], data[5], data[6]);
 }
 
@@ -1193,7 +1193,7 @@  static void print_11u_rcon(const uint8_t type, uint8_t len, const uint8_t *data,
 			printf("Invalid IE length.\n");
 		} else {
 			for (idx = 0; idx < ln0; idx++) {
-				printf("%02hx", data[2 + idx]);
+				printf("%02hhx", data[2 + idx]);
 			}
 			printf("\n");
 		}
@@ -1205,7 +1205,7 @@  static void print_11u_rcon(const uint8_t type, uint8_t len, const uint8_t *data,
 			printf("Invalid IE length.\n");
 		} else {
 			for (idx = 0; idx < ln1; idx++) {
-				printf("%02hx", data[2 + ln0 + idx]);
+				printf("%02hhx", data[2 + ln0 + idx]);
 			}
 			printf("\n");
 		}
@@ -1217,7 +1217,7 @@  static void print_11u_rcon(const uint8_t type, uint8_t len, const uint8_t *data,
 			printf("Invalid IE length.\n");
 		} else {
 			for (idx = 0; idx < ln2; idx++) {
-				printf("%02hx", data[2 + ln0 + ln1 + idx]);
+				printf("%02hhx", data[2 + ln0 + ln1 + idx]);
 			}
 			printf("\n");
 		}