musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018年09月23日 02:51:01 -0400
committerRich Felker <dalias@aerifal.cx>2018年09月23日 02:51:01 -0400
commit8cd738bbee3b4e60a99b71599c338bf444070f18 (patch)
tree6823ca228fe53416f45fdd281c8f67e8072c1926 /src
parent82c41e92320c3f84bd6d24e21c5350a06e2fc831 (diff)
downloadmusl-8cd738bbee3b4e60a99b71599c338bf444070f18.tar.gz
optimize nop case of wmemmove
Diffstat (limited to 'src')
-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
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月20日 07:43:43 +0000

AltStyle によって変換されたページ (->オリジナル) /