@@ -495,10 +495,9 @@ static int cbq_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
}
if (r) {
- char buf[64];
- print_rate(buf, sizeof(buf), r->rate);
- fprintf(f, "rate %s ", buf);
+ fprintf(f, "rate %s ",
+ sprint_rate(r->rate, b1));
linklayer = (r->linklayer & TC_LINKLAYER_MASK);
if (linklayer > TC_LINKLAYER_ETHERNET || show_details)
fprintf(f, "linklayer %s ", sprint_linklayer(linklayer, b2));
@@ -530,14 +529,12 @@ static int cbq_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
fprintf(f, "prio %u", wrr->priority);
else
fprintf(f, "prio no-transmit");
- if (show_details) {
- char buf[64];
+ if (show_details) {
fprintf(f, "/%u ", wrr->cpriority);
- if (wrr->weight != 1) {
- print_rate(buf, sizeof(buf), wrr->weight);
- fprintf(f, "weight %s ", buf);
- }
+ if (wrr->weight != 1)
+ fprintf(f, "weight %s ",
+ sprint_rate(wrr->weight, b1));
if (wrr->allot)
fprintf(f, "allot %ub ", wrr->allot);
}