projects
/
coreboot.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
sigh
[coreboot.git]
/
src
/
lib
/
memcmp.c
1
#include <string.h>
2
3
int memcmp(const void *src1, const void *src2, size_t bytes)
4
{
5
const unsigned char *s1, *s2;
6
int result;
7
s1 = src1;
8
s2 = src2;
9
result = 0;
10
while((bytes > 0) && (result == 0)) {
11
result = *s1 - *s2;
12
bytes--;
13
s1++;
14
s2++;
15
}
16
return result;
17
}