From: Andi Kleen Date: Fri, 19 Oct 2001 09:28:01 +0000 (+0000) Subject: Only print unknown statistics when their counter is > 0. X-Git-Tag: upstream/1.99_20121209git~222 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d67a12a50350c1686df85c693b498f86000226dd;p=platform%2Fupstream%2Fnet-tools.git Only print unknown statistics when their counter is > 0. --- diff --git a/statistics.c b/statistics.c index a878df8..4f76dc3 100644 --- a/statistics.c +++ b/statistics.c @@ -1,6 +1,6 @@ /* * Copyright 1997,1999,2000 Andi Kleen. Subject to the GPL. - * $Id: statistics.c,v 1.14 2001/02/02 18:01:23 pb Exp $ + * $Id: statistics.c,v 1.15 2001/10/19 09:28:01 ak Exp $ * 19980630 - i18n - Arnaldo Carvalho de Melo * 19981113 - i18n fixes - Arnaldo Carvalho de Melo * 19990101 - added net/netstat, -t, -u, -w supprt - Bernd Eckenfels @@ -222,7 +222,8 @@ void printval(struct tabtab *tab, char *title, int val) ent = bsearch(&key, tab->tab, tab->size / sizeof(struct entry), sizeof(struct entry), cmpentries); if (!ent) { /* try our best */ - printf("%*s%s: %d\n", states[state].indent, "", title, val); + if (val) + printf("%*s%s: %d\n", states[state].indent, "", title, val); return; } type = ent->type;