diff options
author | Rich Felker <dalias@aerifal.cx> | 2018-09-23 02:51:01 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018-09-23 02:51:01 -0400 |
commit | 8cd738bbee3b4e60a99b71599c338bf444070f18 (patch) | |
tree | 6823ca228fe53416f45fdd281c8f67e8072c1926 | |
parent | 82c41e92320c3f84bd6d24e21c5350a06e2fc831 (diff) | |
download | musl-8cd738bbee3b4e60a99b71599c338bf444070f18.tar.gz musl-8cd738bbee3b4e60a99b71599c338bf444070f18.tar.bz2 musl-8cd738bbee3b4e60a99b71599c338bf444070f18.tar.xz musl-8cd738bbee3b4e60a99b71599c338bf444070f18.zip |
optimize nop case of wmemmove
-rw-r--r-- | src/string/wmemmove.c | 1 |
1 files changed, 1 insertions, 0 deletions
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 |