]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - tc/q_hhf.c
tc: Remove pointless assignments in batch()
[mirror_iproute2.git] / tc / q_hhf.c
index 66c7188663547ec21f31574977649476750aab20..21186a92c017ab6e1bd7c30b4178122c1a6a4456 100644 (file)
@@ -91,8 +91,7 @@ static int hhf_parse_opt(struct qdisc_util *qu, int argc, char **argv,
                argc--; argv++;
        }
 
-       tail = NLMSG_TAIL(n);
-       addattr_l(n, 1024, TCA_OPTIONS, NULL, 0);
+       tail = addattr_nest(n, 1024, TCA_OPTIONS);
        if (limit)
                addattr_l(n, 1024, TCA_HHF_BACKLOG_LIMIT, &limit,
                          sizeof(limit));
@@ -113,7 +112,7 @@ static int hhf_parse_opt(struct qdisc_util *qu, int argc, char **argv,
        if (non_hh_weight)
                addattr_l(n, 1024, TCA_HHF_NON_HH_WEIGHT, &non_hh_weight,
                          sizeof(non_hh_weight));
-       tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
+       addattr_nest_end(n, tail);
        return 0;
 }