mirror of
https://sourceware.org/git/glibc.git
synced 2025-06-12 08:21:58 +03:00
Improve strcpy performance.
This commit is contained in:
@ -24,17 +24,6 @@
|
||||
char *
|
||||
strcpy (char *dest, const char *src)
|
||||
{
|
||||
char c;
|
||||
char *s = (char *) src;
|
||||
const ptrdiff_t off = dest - s - 1;
|
||||
|
||||
do
|
||||
{
|
||||
c = *s++;
|
||||
s[off] = c;
|
||||
}
|
||||
while (c != '\0');
|
||||
|
||||
return dest;
|
||||
return memcpy (dest, src, strlen (src) + 1));
|
||||
}
|
||||
libc_hidden_builtin_def (strcpy)
|
||||
|
Reference in New Issue
Block a user