1
0
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:
Wilco Dijkstra
2014-11-24 15:09:07 +00:00
parent 5d178c37a0
commit b863d2bc4d
2 changed files with 6 additions and 12 deletions

View File

@ -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)