]> git.saurik.com Git - apple/network_cmds.git/blobdiff - route.tproj/route.c
network_cmds-457.tar.gz
[apple/network_cmds.git] / route.tproj / route.c
index 23cba41d5b4557139c4e6c93c050f30616d996df..c2508bdef7e2140610dc5eea9437b2a32af1a103 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008-2011 Apple Inc. All rights reserved.
+ * Copyright (c) 2008-2013 Apple Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  *
  */
 
 #include <sys/cdefs.h>
+
 #ifndef lint
 __unused static const char copyright[] =
 "@(#) Copyright (c) 1983, 1989, 1991, 1993\n\
        The Regents of the University of California.  All rights reserved.\n";
 #endif /* not lint */
 
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)route.c    8.3 (Berkeley) 3/19/94";
-#endif
-__unused static const char rcsid[] =
-       "$Id: route.c,v 1.4 2006/02/07 06:22:29 lindak Exp $";
-#endif /* not lint */
-
 #include <sys/param.h>
 #include <sys/file.h>
 #include <sys/socket.h>
@@ -328,7 +321,7 @@ routename(sa)
                if (gethostname(domain, MAXHOSTNAMELEN) == 0 &&
                    (cp = index(domain, '.'))) {
                        domain[MAXHOSTNAMELEN] = '\0';
-                       (void) strlcpy(domain, cp + 1, sizeof(domain));
+                       (void) memmove(domain, cp + 1, strlen(cp + 1) + 1);
                } else
                        domain[0] = 0;
        }