aboutsummaryrefslogtreecommitdiffstats
path: root/tc/q_rr.c
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2017-11-24 04:38:29 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-11-24 04:38:29 +0000
commit2d868b48b2f313deb4853e8ac5047d05132969c5 (patch)
tree4a56d9683737ec68d8f0e5615abfea118eec6426 /tc/q_rr.c
parent1934149f47ee4dfe2b22258c2e18f55a510b5889 (diff)
parentff27a837e601b1f0331b4700c167107b38475e31 (diff)
downloadplatform_external_iproute2-caa90c0a67c4c0f1a2b132bb4c4fecf21f87c901.tar.gz
platform_external_iproute2-caa90c0a67c4c0f1a2b132bb4c4fecf21f87c901.tar.bz2
platform_external_iproute2-caa90c0a67c4c0f1a2b132bb4c4fecf21f87c901.zip
am: ff27a837e6 Change-Id: I9bbf3abcb11c1f81c33de67dbe8ea88898fe8fa5
Diffstat (limited to 'tc/q_rr.c')
-rw-r--r--tc/q_rr.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tc/q_rr.c b/tc/q_rr.c
index e8a91652..f330311d 100644
--- a/tc/q_rr.c
+++ b/tc/q_rr.c
@@ -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,
};