aboutsummaryrefslogtreecommitdiff
path: root/string
diff options
context:
space:
mode:
Diffstat (limited to 'string')
-rw-r--r--string/strdup.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/string/strdup.c b/string/strdup.c
index 3e9eee0945..ef883eecdd 100644
--- a/string/strdup.c
+++ b/string/strdup.c
@@ -31,8 +31,6 @@ __strdup (const char *s)
if (new == NULL)
return NULL;
- memcpy (new, s, len);
-
- return (char *) new;
+ return (char *) memcpy (new, s, len);
}
weak_alias (__strdup, strdup)