diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-07-31 21:18:17 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-07-31 21:18:17 -0400 |
commit | 970ef6a1240adfd685c27bf3407dfd06606a17e8 (patch) | |
tree | 1cb962d35f21ee541f4de1bfdce3e255e0b3e701 | |
parent | 5aac5e2189f322a54a49958d928f30e1c9505561 (diff) | |
download | musl-970ef6a1240adfd685c27bf3407dfd06606a17e8.tar.gz musl-970ef6a1240adfd685c27bf3407dfd06606a17e8.tar.xz musl-970ef6a1240adfd685c27bf3407dfd06606a17e8.zip |
optimize mempcpy to minimize need for data saved across the call
-rw-r--r-- | src/string/mempcpy.c | 3 |
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; } |