]> granicus.if.org Git - sysstat/commitdiff
Color support: Improve detection of zero values
authorSebastien GODARD <sysstat@users.noreply.github.com>
Wed, 16 Sep 2015 06:06:55 +0000 (08:06 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Wed, 16 Sep 2015 06:06:55 +0000 (08:06 +0200)
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
common.c

index 818fa9de64b293863a4c5a3762e8a2202d151b4e..88030af26df73431ae0c187c150e71a28a077545 100644 (file)
--- a/common.c
+++ b/common.c
@@ -1005,7 +1005,8 @@ void cprintf_f(int num, int wi, int wd, ...)
 
        for (i = 0; i < num; i++) {
                val = va_arg(args, double);
-               if (val < 0.005) {
+               if (((val < 0.005) && (val > -0.005)) ||
+                   ((wd == 0) && (val < 0.5))) {
                        printf("%s", sc_zero_int_stat);
                }
                else {