Optimize a bit by using mempcpy.
authordrepper <drepper>
Wed, 5 Nov 1997 23:10:07 +0000 (23:10 +0000)
committerdrepper <drepper>
Wed, 5 Nov 1997 23:10:07 +0000 (23:10 +0000)
inet/rcmd.c

index 92ce094..d496a7a 100644 (file)
@@ -330,8 +330,8 @@ again:
 
                dirlen = strlen (pwd->pw_dir);
                pbuf = alloca (dirlen + sizeof "/.rhosts");
-               memcpy (pbuf, pwd->pw_dir, dirlen);
-               memcpy (pbuf + dirlen, "/.rhosts", sizeof "/.rhosts");
+               __mempcpy (__mempcpy (pbuf, pwd->pw_dir, dirlen),
+                          "/.rhosts", sizeof "/.rhosts");
 
                /*
                 * Change effective uid while opening .rhosts.  If root and