]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - tc/m_pedit.c
tc: Remove pointless assignments in batch()
[mirror_iproute2.git] / tc / m_pedit.c
index 8577f875a7c02b71f40d7b64c54698453fe1155c..2aeb56d9615f1e9ee4029aa5280c7170fe95e730 100644 (file)
@@ -685,8 +685,7 @@ int parse_pedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
                }
        }
 
-       tail = NLMSG_TAIL(n);
-       addattr_l(n, MAX_MSG, tca_id, NULL, 0);
+       tail = addattr_nest(n, MAX_MSG, tca_id);
        if (!sel.extended) {
                addattr_l(n, MAX_MSG, TCA_PEDIT_PARMS, &sel,
                          sizeof(sel.sel) +
@@ -699,7 +698,7 @@ int parse_pedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
                pedit_keys_ex_addattr(&sel, n);
        }
 
-       tail->rta_len = (void *)NLMSG_TAIL(n) - (void *)tail;
+       addattr_nest_end(n, tail);
 
        *argc_p = argc;
        *argv_p = argv;