wireless: fix formats

This commit is contained in:
Michael Stapelberg 2010-06-25 00:04:11 +02:00
parent 506b17de6e
commit 71f7166032

View File

@ -101,9 +101,9 @@ void print_wireless_info(const char *interface, const char *format_up, const cha
if (BEGINS_WITH(walk+1, "quality")) {
int max_qual = get_wireless_quality_max(interface);
if (max_qual && max_qual >= quality)
printf("%d%%", (int)(quality * (100.0 / max_qual)));
printf("%03d%%", (int)(quality * (100.0 / max_qual)));
else
printf("%d", quality);
printf("%d dBm", quality);
walk += strlen("quality");
}