From: Markus Theil <markus.theil@tu-ilmenau.de>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org,
Markus Theil <markus.theil@tu-ilmenau.de>
Subject: [PATCH 2/2] iw: scan: fix some format string warnings found by clang
Date: Mon, 10 Feb 2020 09:13:54 +0100 [thread overview]
Message-ID: <20200210081354.10390-2-markus.theil@tu-ilmenau.de> (raw)
In-Reply-To: <20200210081354.10390-1-markus.theil@tu-ilmenau.de>
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
scan.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
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");
}
--
2.25.0
prev parent reply other threads:[~2020-02-10 8:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-10 8:13 [PATCH 1/2] iw: scan: fix if scope for print_measurement_pilot_tx() Markus Theil
2020-02-10 8:13 ` Markus Theil [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200210081354.10390-2-markus.theil@tu-ilmenau.de \
--to=markus.theil@tu-ilmenau.de \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).