aboutsummaryrefslogtreecommitdiffstats
path: root/tc/q_choke.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_choke.c
parent1934149f47ee4dfe2b22258c2e18f55a510b5889 (diff)
parentff27a837e601b1f0331b4700c167107b38475e31 (diff)
downloadplatform_external_iproute2-2d868b48b2f313deb4853e8ac5047d05132969c5.tar.gz
platform_external_iproute2-2d868b48b2f313deb4853e8ac5047d05132969c5.tar.bz2
platform_external_iproute2-2d868b48b2f313deb4853e8ac5047d05132969c5.zip
am: ff27a837e6 Change-Id: I9bbf3abcb11c1f81c33de67dbe8ea88898fe8fa5
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();