tb buffer initialization is now done in the parser

(Logical change 1.129)
This commit is contained in:
5!tgraf 2005-01-18 22:11:58 +00:00
parent 753fca4f54
commit 87bc1f03ad
3 changed files with 0 additions and 8 deletions

View File

@ -222,7 +222,6 @@ int print_neigh(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
(r->ndm_family != AF_DECnet))
return 0;
memset(tb, 0, sizeof(tb));
parse_rtattr(tb, NDA_MAX, NDA_RTA(r), n->nlmsg_len - NLMSG_LENGTH(sizeof(*r)));
if (tb[NDA_DST]) {

View File

@ -190,8 +190,6 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
if (filter.rprefsrc.family && r->rtm_family != filter.rprefsrc.family)
return 0;
memset(tb, 0, sizeof(tb));
parse_rtattr(tb, RTA_MAX, RTM_RTA(r), len);
memset(&dst, 0, sizeof(dst));
@ -464,8 +462,6 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
unsigned mxlock = 0;
struct rtattr *mxrta[RTAX_MAX+1];
memset(mxrta, 0, sizeof(mxrta));
parse_rtattr(mxrta, RTAX_MAX, RTA_DATA(tb[RTA_METRICS]),
RTA_PAYLOAD(tb[RTA_METRICS]));
if (mxrta[RTAX_LOCK])
@ -534,7 +530,6 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
} else
fprintf(fp, "%s\tnexthop", _SL_);
if (nh->rtnh_len > sizeof(*nh)) {
memset(tb, 0, sizeof(tb));
parse_rtattr(tb, RTA_MAX, RTNH_DATA(nh), nh->rtnh_len - sizeof(*nh));
if (tb[RTA_GATEWAY]) {
fprintf(fp, " via %s ",
@ -1340,7 +1335,6 @@ int iproute_get(int argc, char **argv)
return -1;
}
memset(tb, 0, sizeof(tb));
parse_rtattr(tb, RTA_MAX, RTM_RTA(r), len);
if (tb[RTA_PREFSRC]) {

View File

@ -329,7 +329,6 @@ int do_one_request(struct nlmsghdr *n)
!(ndm->ndm_state&~NUD_NOARP))
return 0;
memset(tb, 0, sizeof(tb));
parse_rtattr(tb, NDA_MAX, NDA_RTA(ndm), len);
if (!tb[NDA_DST])