noexist:
p = calloc(1, sizeof(*p));
if (p) {
- strncpy(p->id, str, sizeof(p->id) - 1);
+ strlcpy(p->id, str, sizeof(p->id));
p->parse_peopt = pedit_parse_nopopt;
goto reg;
}
res = parse_offset(&argc, &argv, sel, &tkey);
goto done;
} else {
- char k[16];
+ char k[FILTER_NAMESZ];
struct m_pedit_util *p = NULL;
strncpy(k, *argv, sizeof(k) - 1);
}
}
- 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) +
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;