]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - tc/q_sfb.c
Use C99 style initializers everywhere
[mirror_iproute2.git] / tc / q_sfb.c
index 3b6d45269a27ec9d76f729742403d83e7789c8ff..05c5f1325aeb869b91c91c67308a065fd273e7ed 100644 (file)
@@ -51,17 +51,16 @@ static int get_prob(__u32 *val, const char *arg)
 static int sfb_parse_opt(struct qdisc_util *qu, int argc, char **argv,
                         struct nlmsghdr *n)
 {
-       struct tc_sfb_qopt opt;
+       struct tc_sfb_qopt opt = {
+               .rehash_interval = 600*1000,
+               .warmup_time = 60*1000,
+               .penalty_rate = 10,
+               .penalty_burst = 20,
+               .increment = (SFB_MAX_PROB + 1000) / 2000,
+               .decrement = (SFB_MAX_PROB + 10000) / 20000,
+       };
        struct rtattr *tail;
 
-       memset(&opt, 0, sizeof(opt));
-       opt.rehash_interval = 600*1000;
-       opt.warmup_time = 60*1000;
-       opt.penalty_rate = 10;
-       opt.penalty_burst = 20;
-       opt.increment = (SFB_MAX_PROB + 1000) / 2000;
-       opt.decrement = (SFB_MAX_PROB + 10000) / 20000;
-
        while (argc > 0) {
            if (strcmp(*argv, "rehash") == 0) {
                        NEXT_ARG();