coreboot-kgpe-d16/src/lib/memcmp.c
Lee Leahy 45fde705b6 src/lib: Add space before (
Fix the following error detected by checkpatch.pl:

ERROR: space required before the open parenthesis '('

TEST=Build and run on Galileo Gen2

Change-Id: I8953fecbe75136ff989c9e3cf6c5e155dcee3c3b
Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Reviewed-on: https://review.coreboot.org/18698
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-03-09 17:30:21 +01:00

17 lines
275 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;
}