summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-07-31 21:18:17 -0400
committerRich Felker <dalias@aerifal.cx>2012-07-31 21:18:17 -0400
commit970ef6a1240adfd685c27bf3407dfd06606a17e8 (patch)
tree1cb962d35f21ee541f4de1bfdce3e255e0b3e701 /src
parent5aac5e2189f322a54a49958d928f30e1c9505561 (diff)
downloadmusl-970ef6a1240adfd685c27bf3407dfd06606a17e8.tar.gz
musl-970ef6a1240adfd685c27bf3407dfd06606a17e8.tar.bz2
musl-970ef6a1240adfd685c27bf3407dfd06606a17e8.tar.xz
musl-970ef6a1240adfd685c27bf3407dfd06606a17e8.zip
optimize mempcpy to minimize need for data saved across the call
Diffstat (limited to 'src')
-rw-r--r--src/string/mempcpy.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/string/mempcpy.c b/src/string/mempcpy.c
index 1b323f1e..c23ca69e 100644
--- a/src/string/mempcpy.c
+++ b/src/string/mempcpy.c
@@ -2,6 +2,5 @@
void *mempcpy(void *dest, const void *src, size_t n)
{
- memcpy(dest, src, n);
- return (char *)dest + n;
+ return (char *)memcpy(dest, src, n) + n;
}