Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
musl
/
29f3202b731185d993a399f04d2f3e3f78db5a81
/
.
/
src
/
string
/
memcmp.c
blob: bdbce9f0f563cc957b971ef1f2b9dd88421f772a [
file
] [
log
] [
blame
]
Rich Felker
0b44a03
2011-02-12 00:22:29 -0500
[
diff
] [
blame
]
1
#include
<string.h>
2
3
int
memcmp
(
const
void
*
vl
,
const
void
*
vr
,
size_t
n
)
4
{
5
const
unsigned
char
*
l
=
vl
,
*
r
=
vr
;
6
for
(;
n
&&
*
l
==
*
r
;
n
--,
l
++,
r
++);
7
return
n
?
*
l
-*
r
:
0
;
8
}