From bac03cdde1137c16b4c194e137310e2748661dcc Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 6 Sep 2012 20:28:42 -0400 Subject: remove dependency of wmemmove on wmemcpy direction unlike the memmove commit, this one should be fine to leave in place. wmemmove is not performance-critical, and even if it were, it's already copying whole 32-bit words at a time instead of bytes. --- src/string/wmemmove.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/string/wmemmove.c b/src/string/wmemmove.c index 49608cae..89041c32 100644 --- a/src/string/wmemmove.c +++ b/src/string/wmemmove.c @@ -3,9 +3,9 @@ wchar_t *wmemmove(wchar_t *d, const wchar_t *s, size_t n) { - if ((size_t)(d-s) < n) { + if ((size_t)(d-s) < n) while (n--) d[n] = s[n]; - return d; - } - return wmemcpy(d, s, n); + else + while (n--) *d++ = *s++; + return d; } -- cgit v1.2.1