Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
musl
/
594318fd3d13c7dda1ea87a76934e052ac74301f
/
.
/
src
/
string
/
memmove.c
blob: 9153a64476a97a64bfc1e0614276f91e18ebea73 [
file
] [
log
] [
blame
]
#include
<string.h>
void
*
memmove
(
void
*
dest
,
const
void
*
src
,
size_t
n
)
{
char
*
d
=
dest
;
const
char
*
s
=
src
;
if
(
d
==
s
)
return
d
;
if
((
size_t
)(
d
-
s
)
<
n
)
while
(
n
--)
d
[
n
]
=
s
[
n
];
else
while
(
n
--)
*
d
++
=
*
s
++;
return
dest
;
}