From: Vadim Kochan <[email protected]> '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 <[email protected]> --- flowtop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flowtop.c b/flowtop.c index 0927ff5..74a6ab4 100644 --- a/flowtop.c +++ b/flowtop.c @@ -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.); -- 2.4.2 -- You received this message because you are subscribed to the Google Groups "netsniff-ng" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
