summaryrefslogtreecommitdiffstats
path: root/package/iwinfo/src/iwinfo_cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'package/iwinfo/src/iwinfo_cli.c')
-rw-r--r--package/iwinfo/src/iwinfo_cli.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/package/iwinfo/src/iwinfo_cli.c b/package/iwinfo/src/iwinfo_cli.c
index 0fdb21ec6..7ec5aef95 100644
--- a/package/iwinfo/src/iwinfo_cli.c
+++ b/package/iwinfo/src/iwinfo_cli.c
@@ -134,7 +134,8 @@ static char * format_rate(int rate)
if (rate <= 0)
snprintf(buf, sizeof(buf), "unknown");
else
- snprintf(buf, sizeof(buf), "%.1f MBit/s", ((float)rate / 1000.0));
+ snprintf(buf, sizeof(buf), "%d.%d MBit/s",
+ rate / 1000, (rate % 1000) / 100);
return buf;
}