From 46ba2468a3de85076ce92ce8e8cc7a086bac69f0 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 27 Mar 2018 23:54:54 +0200 Subject: ioctl(SIOCGIFINDEX) does not require clearing of entire ifr function old new delta INET6_setroute 492 472 -20 do_iplink 1357 1330 -27 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-47) Total: -47 bytes Signed-off-by: Denys Vlasenko --- networking/udhcp/d6_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'networking/udhcp') diff --git a/networking/udhcp/d6_socket.c b/networking/udhcp/d6_socket.c index 315c8d98a..6ad53a9c2 100644 --- a/networking/udhcp/d6_socket.c +++ b/networking/udhcp/d6_socket.c @@ -63,7 +63,7 @@ int FAST_FUNC d6_read_interface(const char *interface, int *ifindex, struct in6_ struct ifreq ifr; int fd; - memset(&ifr, 0, sizeof(ifr)); + /*memset(&ifr, 0, sizeof(ifr)); - SIOCGIFINDEX does not need to clear all */ strncpy_IFNAMSIZ(ifr.ifr_name, interface); fd = xsocket(AF_INET6, SOCK_RAW, IPPROTO_RAW); if (ioctl(fd, SIOCGIFINDEX, &ifr) == 0) { -- cgit v1.2.3