Skip to contentSkip to conversation

tc: don't double print rate

PATCH New Stephen Hemminger 1 participant 1 message Jul 9, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tc: don't double print rate

Conversion to print stats in JSON forgot to remove existing fprintf.

Fixes 4fcec7f3665b ("tc: jsonify stats2")
---
 tc/tc_util.c | 2 --
 1 file changed, 2 deletions(-)
tc/tc_util.c +0 -2
index e0c96291ade0..d7578528a31b 100644
@@ -842,8 +842,6 @@ void print_tcstats2_attr(FILE *fp, struct rtattr *rta, char *prefix, struct rtat
 
 		memcpy(&re, RTA_DATA(tbs[TCA_STATS_RATE_EST]),
 		       MIN(RTA_PAYLOAD(tbs[TCA_STATS_RATE_EST]), sizeof(re)));
-		fprintf(fp, "\n%srate %s %upps ",
-			prefix, sprint_rate(re.bps, b1), re.pps);
 		print_string(PRINT_FP, NULL, "\n%s", prefix);
 		print_uint(PRINT_JSON, "rate", NULL, re.bps);
 		print_string(PRINT_FP, NULL, "rate %s",
Signature · 1 line
2.18.0