diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2014-09-05 10:30:16 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-09-15 15:00:49 -0400 |
commit | 62c5afb8e388eae4e54f1ad415c1a1bc745c8b08 (patch) | |
tree | 11b4c2ca1f3734bfc30dd147797d20605ca6dfa1 | |
parent | 1186b623c2b04ae8c963c36f1dbcc159a6c99f60 (diff) |
hostap: proc: substitute loops by %*phN
For dumping small buffers we may use %*phN specifier instead of custom
approach..
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/hostap/hostap_proc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/hostap/hostap_proc.c b/drivers/net/wireless/hostap/hostap_proc.c index 4e5c0f8c9496..8efd17c52f65 100644 --- a/drivers/net/wireless/hostap/hostap_proc.c +++ b/drivers/net/wireless/hostap/hostap_proc.c | |||
@@ -186,11 +186,9 @@ static int prism2_bss_list_proc_show(struct seq_file *m, void *v) | |||
186 | bss->ssid[i] : '_'); | 186 | bss->ssid[i] : '_'); |
187 | 187 | ||
188 | seq_putc(m, '\t'); | 188 | seq_putc(m, '\t'); |
189 | for (i = 0; i < bss->ssid_len; i++) | 189 | seq_printf(m, "%*phN", (int)bss->ssid_len, bss->ssid); |
190 | seq_printf(m, "%02x", bss->ssid[i]); | ||
191 | seq_putc(m, '\t'); | 190 | seq_putc(m, '\t'); |
192 | for (i = 0; i < bss->wpa_ie_len; i++) | 191 | seq_printf(m, "%*phN", (int)bss->wpa_ie_len, bss->wpa_ie); |
193 | seq_printf(m, "%02x", bss->wpa_ie[i]); | ||
194 | seq_putc(m, '\n'); | 192 | seq_putc(m, '\n'); |
195 | return 0; | 193 | return 0; |
196 | } | 194 | } |