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>
This commit is contained in:
Andy Shevchenko 2014-09-05 17:30:16 +03:00 committed by John W. Linville
parent 1186b623c2
commit 62c5afb8e3

View File

@ -186,11 +186,9 @@ static int prism2_bss_list_proc_show(struct seq_file *m, void *v)
bss->ssid[i] : '_');
seq_putc(m, '\t');
for (i = 0; i < bss->ssid_len; i++)
seq_printf(m, "%02x", bss->ssid[i]);
seq_printf(m, "%*phN", (int)bss->ssid_len, bss->ssid);
seq_putc(m, '\t');
for (i = 0; i < bss->wpa_ie_len; i++)
seq_printf(m, "%02x", bss->wpa_ie[i]);
seq_printf(m, "%*phN", (int)bss->wpa_ie_len, bss->wpa_ie);
seq_putc(m, '\n');
return 0;
}