repo.or.cz
/
vde.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
loadlwipv6 inlined
[vde.git]
/
vde-2
/
src
/
common
/
memcmp.c
blob
66d593cb35ee2ce1699e101a584f6475eb3fccb0
1
#include <config.h>
2
#include <vde.h>
3
#include <vdecommon.h>
4
5
int
memcmp
(
const void
*
v1
,
const void
*
v2
,
size_t
n
)
6
{
7
if
(
n
!=
0
) {
8
const unsigned char
*
s1
=
v1
, *
s2
=
v2
;
9
do
{
10
if
(*
s1
++ != *
s2
++)
return
*--
s1
- *--
s2
;
11
}
while
(--
n
!=
0
);
12
}
13
return
0
;
14
}
15