diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2017-11-24 04:35:55 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-11-24 04:35:55 +0000 |
commit | ff27a837e601b1f0331b4700c167107b38475e31 (patch) | |
tree | 4a56d9683737ec68d8f0e5615abfea118eec6426 /tc/q_rr.c | |
parent | ea40c76ce7c05071cd7e99acf04f099c55a402e0 (diff) | |
parent | ef18ea8cd8792986b2e68ae2d28c26094298d586 (diff) | |
download | platform_external_iproute2-ff27a837e601b1f0331b4700c167107b38475e31.tar.gz platform_external_iproute2-ff27a837e601b1f0331b4700c167107b38475e31.tar.bz2 platform_external_iproute2-ff27a837e601b1f0331b4700c167107b38475e31.zip |
Merge changes Id0db30f6,I117dcabd,If21f95e2,I42c1ebfa am: 550751fdb7
am: ef18ea8cd8
Change-Id: I53ed491ce401e09246263c69e91c1bbbb026fe8b
Diffstat (limited to 'tc/q_rr.c')
-rw-r--r-- | tc/q_rr.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -33,7 +33,7 @@ static int rr_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlm { int pmap_mode = 0; int idx = 0; - struct tc_prio_qopt opt={3,{ 1, 2, 2, 2, 1, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 }}; + struct tc_prio_qopt opt = {3, { 1, 2, 2, 2, 1, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 } }; struct rtattr *nest; unsigned char mq = 0; @@ -58,7 +58,8 @@ static int rr_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlm } else if (strcmp(*argv, "multiqueue") == 0) { mq = 1; } else { - unsigned band; + unsigned int band; + if (!pmap_mode) { fprintf(stderr, "What is \"%s\"?\n", *argv); explain(); @@ -102,7 +103,7 @@ static int rr_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) return -1; fprintf(f, "bands %u priomap ", qopt->bands); - for (i=0; i <= TC_PRIO_MAX; i++) + for (i = 0; i <= TC_PRIO_MAX; i++) fprintf(f, " %d", qopt->priomap[i]); if (tb[TCA_PRIO_MQ]) @@ -113,7 +114,7 @@ static int rr_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) } struct qdisc_util rr_qdisc_util = { - .id = "rr", + .id = "rr", .parse_qopt = rr_parse_opt, .print_qopt = rr_print_opt, }; |