From 48cef4eb2b30bbc8ff04c0bb85c0b0689896e5e8 Mon Sep 17 00:00:00 2001 From: 6!tgraf <6!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/ipaddress.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index ae6f8c1b..2dc38b6a 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -147,7 +147,6 @@ int print_linkinfo(const struct sockaddr_nl *who, if (filter.up && !(ifi->ifi_flags&IFF_UP)) return 0; - memset(tb, 0, sizeof(tb)); parse_rtattr(tb, IFLA_MAX, IFLA_RTA(ifi), len); if (tb[IFLA_IFNAME] == NULL) { fprintf(stderr, "BUG: nil ifname\n"); @@ -297,7 +296,6 @@ int print_addrinfo(const struct sockaddr_nl *who, struct nlmsghdr *n, if (filter.flushb && n->nlmsg_type != RTM_NEWADDR) return 0; - memset(rta_tb, 0, sizeof(rta_tb)); parse_rtattr(rta_tb, IFA_MAX, IFA_RTA(ifa), n->nlmsg_len - NLMSG_LENGTH(sizeof(*ifa))); if (!rta_tb[IFA_LOCAL]) @@ -663,7 +661,6 @@ int ipaddr_list_or_flush(int argc, char **argv, int flush) continue; if (filter.pfx.family || filter.label) { struct rtattr *tb[IFA_MAX+1]; - memset(tb, 0, sizeof(tb)); parse_rtattr(tb, IFA_MAX, IFA_RTA(ifa), IFA_PAYLOAD(n)); if (!tb[IFA_LOCAL]) tb[IFA_LOCAL] = tb[IFA_ADDRESS];