MCPcopy Create free account
hub / github.com/coreboot/coreboot / memcmp

Function memcmp

src/lib/memcmp.c:5–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include <string.h>
4
5int memcmp(const void *src1, const void *src2, size_t bytes)
6{
7 const unsigned char *s1, *s2;
8 int result;
9 s1 = src1;
10 s2 = src2;
11 result = 0;
12 while ((bytes > 0) && (result == 0)) {
13 result = *s1 - *s2;
14 bytes--;
15 s1++;
16 s2++;
17 }
18 return result;
19}

Callers 15

gcov_exitFunction · 0.70
check_if_dimm_changedFunction · 0.70
verify_fmapFunction · 0.70
detailed_cvt_descriptorFunction · 0.70
decode_edidFunction · 0.70
write_acpi_tableFunction · 0.50
identify_cpuFunction · 0.50
init_vbnvFunction · 0.50

Calls

no outgoing calls

Tested by 10

test_strdupFunction · 0.40
test_strconcatFunction · 0.40
test_strncpyFunction · 0.40
test_strcpyFunction · 0.40
test_memcmp_equalFunction · 0.40
test_memcmp_zero_sizeFunction · 0.40
vb2_hash_verifyFunction · 0.40
fmap_create_testFunction · 0.40