From 586daa5c53e99e0327dec27dfdaf6f5436d0c92c Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 9 Jun 2013 12:03:40 +0200 Subject: ifpps: Don't re-initialize stats value index counter in CSV mode In case we add new stats values, j might be higher already when entering the loop. As j will have the proper number anyway, there is no point in re-initializing. Signed-off-by: Tobias Klauser --- ifpps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ifpps.c') diff --git a/ifpps.c b/ifpps.c index f4b533a..5495ce9 100644 --- a/ifpps.c +++ b/ifpps.c @@ -1002,7 +1002,7 @@ static void term_csv_header(const char *ifname, const struct ifstat *abs, cpus = get_number_cpus(); - for (i = 0, j = 22; i < cpus; ++i) { + for (i = 0; i < cpus; ++i) { printf("%d:cpu%i-usr-per-t ", j++, i); printf("%d:cpu%i-nice-per-t ", j++, i); printf("%d:cpu%i-sys-per-t ", j++, i); -- cgit v1.2.3-54-g00ecf