]> granicus.if.org Git - sudo/commitdiff
Use memset() instead of zero_bytes() since we don't include sudoers.h
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 11 Oct 2010 19:51:21 +0000 (15:51 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 11 Oct 2010 19:51:21 +0000 (15:51 -0400)
src/net_ifs.c

index 10a34edad58757c666cdb9e1d3bc7910c2607046..2284b5cce2935b3eacd079705be5cd4ca9d278ca 100644 (file)
@@ -275,7 +275,7 @@ get_net_ifs(char **addrinfo)
                continue;
 
 #ifdef SIOCGIFFLAGS
-       zero_bytes(&ifr_tmp, sizeof(ifr_tmp));
+       memset(&ifr_tmp, 0, sizeof(ifr_tmp));
        strncpy(ifr_tmp.ifr_name, ifr->ifr_name, sizeof(ifr_tmp.ifr_name) - 1);
        if (ioctl(sock, SIOCGIFFLAGS, (caddr_t) &ifr_tmp) < 0)
 #endif
@@ -300,7 +300,7 @@ get_net_ifs(char **addrinfo)
        previfname = ifr->ifr_name;
 
        /* Get the netmask. */
-       zero_bytes(&ifr_tmp, sizeof(ifr_tmp));
+       memset(&ifr_tmp, 0, sizeof(ifr_tmp));
        strncpy(ifr_tmp.ifr_name, ifr->ifr_name, sizeof(ifr_tmp.ifr_name) - 1);
 #ifdef _ISC
        STRSET(SIOCGIFNETMASK, (caddr_t) &ifr_tmp, sizeof(ifr_tmp));