]> git.saurik.com Git - apple/network_cmds.git/blobdiff - mtest.tproj/mtest.c
network_cmds-596.tar.gz
[apple/network_cmds.git] / mtest.tproj / mtest.c
index 12eb891160d8a32e5336d89b52d364ebc596c080..9c1614e928e4cb317e870302b914d84bbbbda99d 100644 (file)
@@ -347,19 +347,6 @@ af2sock(const int af, int s, int s6)
        return (-1);
 }
 
-static __inline int
-af2socklen(const int af)
-{
-       
-       if (af == AF_INET)
-               return (sizeof(struct sockaddr_in));
-#ifdef INET6
-       if (af == AF_INET6)
-               return (sizeof(struct sockaddr_in6));
-#endif
-       return (-1);
-}
-
 static void
 process_cmd(char *cmd, int s, int s6 __unused, FILE *fp __unused)
 {
@@ -757,7 +744,7 @@ process_cmd(char *cmd, int s, int s6 __unused, FILE *fp __unused)
                                warnc(EINVAL, "ether_aton");
                                break;
                        }
-                       strlcpy(ifr.ifr_name, str1, IF_NAMESIZE);
+                       strlcpy(ifr.ifr_name, str1, sizeof(ifr.ifr_name));
                        memcpy(LLADDR(dlp), ep, ETHER_ADDR_LEN);
                        if (ioctl(s, (*cmd == 'a') ? SIOCADDMULTI : SIOCDELMULTI,
                                          &ifr) == -1) {