From: Rich Felker Date: Sun, 23 Sep 2018 06:51:01 +0000 (-0400) Subject: optimize nop case of wmemmove X-Git-Tag: v1.1.21~71 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8cd738bbee3b4e60a99b71599c338bf444070f18;p=oweals%2Fmusl.git optimize nop case of wmemmove --- diff --git a/src/string/wmemmove.c b/src/string/wmemmove.c index d58cebac..964c9032 100644 --- a/src/string/wmemmove.c +++ b/src/string/wmemmove.c @@ -4,6 +4,7 @@ wchar_t *wmemmove(wchar_t *d, const wchar_t *s, size_t n) { wchar_t *d0 = d; + if (d == s) return d; if ((uintptr_t)d-(uintptr_t)s < n * sizeof *d) while (n--) d[n] = s[n]; else