From 87bc1f03ad3fb16f7c58becec9843378a7154495 Mon Sep 17 00:00:00 2001 From: 5!tgraf <5!tgraf> Date: Tue, 18 Jan 2005 22:11:58 +0000 Subject: [PATCH] tb buffer initialization is now done in the parser (Logical change 1.129) --- ip/ipneigh.c | 1 - ip/iproute.c | 6 ------ misc/arpd.c | 1 - 3 files changed, 8 deletions(-) diff --git a/ip/ipneigh.c b/ip/ipneigh.c index 2caa98ba..51e7a176 100644 --- a/ip/ipneigh.c +++ b/ip/ipneigh.c @@ -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]) { diff --git a/ip/iproute.c b/ip/iproute.c index ccea83b8..52b06f5a 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -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]) { diff --git a/misc/arpd.c b/misc/arpd.c index 7858ab04..85b2a1cc 100644 --- a/misc/arpd.c +++ b/misc/arpd.c @@ -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])