aboutsummaryrefslogtreecommitdiff
path: root/string/strcpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'string/strcpy.c')
-rw-r--r--string/strcpy.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/string/strcpy.c b/string/strcpy.c
index caa234a..91f9cc6 100644
--- a/string/strcpy.c
+++ b/string/strcpy.c
@@ -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)