repo.or.cz
/
dockapps.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Remove trailing whitespace.
[dockapps.git]
/
wmweather+
/
b0rken
/
memcmp.c
blob
c06b865659cfae981baabef57c4a41af1115bfcf
1
/* Cheapo version of memcmp */
2
3
#include <stdlib.h>
4
5
int
memcmp
(
const void
*
s1
,
const void
*
s2
,
size_t
n
){
6
int
i
,
j
;
7
8
for
(
i
=
0
;
i
<
n
;
i
++){
9
j
=((
unsigned char
*)
s1
)[
i
]-((
unsigned char
*)
s2
)[
i
];
10
if
(
j
)
return
j
;
11
}
12
return
0
;
13
}