Fix signedness problem in memcmp.
Signed-off-by: Ulf Jordan <jordan@chalmers.se>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3491 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
diff --git a/payloads/libpayload/libc/memory.c b/payloads/libpayload/libc/memory.c
index 57c31e0..eb9fecc 100644
--- a/payloads/libpayload/libc/memory.c
+++ b/payloads/libpayload/libc/memory.c
@@ -107,8 +107,8 @@
* @return If len is 0, return zero. If the areas match, return zero.
* Otherwise return non-zero.
*/
-int memcmp(const char *s1, const char *s2, size_t len)
+int memcmp(const void *s1, const void *s2, size_t len)
{
- for (; len && *s1++ == *s2++; len--) ;
+ for (; len && *(char *)s1++ == *(char *)s2++; len--) ;
return len;
}