From f7b8e096e5a5f922a6a96f502c2a6f40b1cd7070 Mon Sep 17 00:00:00 2001 From: Viktor Kojouharov Date: Mon, 26 Mar 2007 17:06:32 +0000 Subject: [PATCH] increase of the "resolution" of the speed info in the MB range SVN revision: 29179 --- src/e_mod_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/e_mod_net.c b/src/e_mod_net.c index ad0c407..47355b1 100644 --- a/src/e_mod_net.c +++ b/src/e_mod_net.c @@ -335,9 +335,9 @@ static void _bytes_to_string(bytes_t bytes, char *string, int size) { if (bytes > 1048576) - snprintf(string, size, "%lu Mb", (bytes / 1048576)); + snprintf(string, size, "%.2f MB", ((float) bytes / 1048576)); else if ((bytes > 1024) && (bytes < 1048576)) - snprintf(string, size, "%lu Kb", (bytes / 1024)); + snprintf(string, size, "%lu KB", (bytes / 1024)); else snprintf(string, size, "%lu B", bytes); }