From: Chander Govindarajan Date: Mon, 17 Jul 2023 09:32:46 +0000 (+0530) Subject: misc/ifstat: fix incorrect output data in json mode X-Git-Tag: v6.5.0~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b954463083b5c04f8e577b3764dbec35fcb8a7d;p=thirdparty%2Fiproute2.git misc/ifstat: fix incorrect output data in json mode Due to this bug, in json mode (with the -j flag), the output was always in absolute mode (as if passing in the -a flag) and not in relative mode. Signed-off-by: Chander Govindarajan Signed-off-by: Stephen Hemminger --- diff --git a/misc/ifstat.c b/misc/ifstat.c index f6f9ba502..6c76fa156 100644 --- a/misc/ifstat.c +++ b/misc/ifstat.c @@ -569,7 +569,7 @@ static void dump_incr_db(FILE *fp) continue; if (jw) - print_one_json(jw, n, n->val); + print_one_json(jw, n, vals); else print_one_if(fp, n, vals); }