projects
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Sprinkle cdecl declarations liberally all around to make a bunch of the base componen...
[reactos.git]
/
reactos
/
lib
/
sdk
/
crt
/
mem
/
memcmp.c
1
2
#include <string.h>
3
4
#ifdef _MSC_VER
5
#pragma warning(disable: 4164)
6
#pragma function(memcmp)
7
#endif
8
9
int
__cdecl
memcmp
(
const void
*
s1
,
const void
*
s2
,
size_t
n
)
10
{
11
if
(
n
!=
0
) {
12
const unsigned char
*
p1
=
s1
, *
p2
=
s2
;
13
do
{
14
if
(*
p1
++ != *
p2
++)
15
return
(*--
p1
- *--
p2
);
16
}
while
(--
n
!=
0
);
17
}
18
return
0
;
19
}