diff options
author | Vadim Kochan <vadim4j@gmail.com> | 2015-07-26 13:11:55 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2015-07-26 20:33:25 +0200 |
commit | 3368297312366e2a51a7f87d2c9e645692408041 (patch) | |
tree | efe2264fc6e953b6570caa0bf788877c05b8f735 | |
parent | b9db88f68c11bb52f8edadbc3b365a552cd9489b (diff) |
flowtop: Fix bytes counter print for gigabyte
'G' should be printed when bytes > 1000000000 but
it was printed with 'M' prefix which was caused
by missing 'else'.
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-rw-r--r-- | flowtop.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -713,7 +713,7 @@ static char *bandw2str(double bytes, char *buf, size_t len) { if (bytes > 1000000000.) snprintf(buf, len, "%.1fG", bytes / 1000000000.); - if (bytes > 1000000.) + else if (bytes > 1000000.) snprintf(buf, len, "%.1fM", bytes / 1000000.); else if (bytes > 1000.) snprintf(buf, len, "%.1fK", bytes / 1000.); |