mirror of
https://git.musl-libc.org/git/musl
synced 2025-02-21 20:54:25 +03:00
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.
This commit is contained in:
parent
594318fd3d
commit
bac03cdde1
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user