summaryrefslogtreecommitdiff
path: root/ifpps.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2013-06-09 12:03:40 +0200
committerTobias Klauser <tklauser@distanz.ch>2013-06-09 12:05:36 +0200
commit586daa5c53e99e0327dec27dfdaf6f5436d0c92c (patch)
treea5838039bd89a5f25ad84b3670ccb6958a2e35e4 /ifpps.c
parent4d1057fcb06e9d26cece9dbae8e62bf57bacd68c (diff)
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 <tklauser@distanz.ch>
Diffstat (limited to 'ifpps.c')
-rw-r--r--ifpps.c2
1 files changed, 1 insertions, 1 deletions
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);