aboutsummaryrefslogtreecommitdiffstats
path: root/tc/q_choke.c
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-11-26 08:25:14 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-11-26 08:25:14 +0000
commite4637bd9ed150244a906bc8b080f649034b68c8f (patch)
tree4a56d9683737ec68d8f0e5615abfea118eec6426 /tc/q_choke.c
parent1934149f47ee4dfe2b22258c2e18f55a510b5889 (diff)
parent2d868b48b2f313deb4853e8ac5047d05132969c5 (diff)
downloadplatform_external_iproute2-pie-release-2.tar.gz
platform_external_iproute2-pie-release-2.tar.bz2
platform_external_iproute2-pie-release-2.zip
Change-Id: Ic9de3ebd76d093ed177a6197aee2a9beaed4a247
Diffstat (limited to 'tc/q_choke.c')
-rw-r--r--tc/q_choke.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/tc/q_choke.c b/tc/q_choke.c
index bd9ceb84..a234d2e0 100644
--- a/tc/q_choke.c
+++ b/tc/q_choke.c
@@ -34,19 +34,17 @@ static void explain(void)
static int choke_parse_opt(struct qdisc_util *qu, int argc, char **argv,
struct nlmsghdr *n)
{
- struct tc_red_qopt opt;
- unsigned burst = 0;
- unsigned avpkt = 1000;
+ struct tc_red_qopt opt = {};
+ unsigned int burst = 0;
+ unsigned int avpkt = 1000;
double probability = 0.02;
- unsigned rate = 0;
+ unsigned int rate = 0;
int ecn_ok = 0;
int wlog;
__u8 sbuf[256];
__u32 max_P;
struct rtattr *tail;
- memset(&opt, 0, sizeof(opt));
-
while (argc > 0) {
if (strcmp(*argv, "limit") == 0) {
NEXT_ARG();