coreboot-kgpe-d16/src/lib/memcmp.c
Eric Biederman 8ca8d7665d - Initial checkin of the freebios2 tree
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@784 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2003-04-22 19:02:15 +00:00

17 lines
274 B
C

#include <string.h>
int memcmp(const void *src1, const void *src2, size_t bytes)
{
const unsigned char *s1, *s2;
int result;
s1 = src1;
s2 = src2;
result = 0;
while((bytes > 0) && (result == 0)) {
result = *s1 - *s2;
bytes--;
s1++;
s2++;
}
return result;
}