summaryrefslogtreecommitdiff
path: root/payloads/libpayload/libc
diff options
context:
space:
mode:
authorUlf Jordan <jordan@chalmers.se>2008-08-09 19:34:56 +0000
committerPeter Stuge <peter@stuge.se>2008-08-09 19:34:56 +0000
commit68285699da68490681b330f0d345079b231c11cf (patch)
tree4d23db264b15fc319c14ed06795f45556d778f7b /payloads/libpayload/libc
parentf1e127472bee89453a2962e7cf383bcb112449b9 (diff)
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
Diffstat (limited to 'payloads/libpayload/libc')
-rw-r--r--payloads/libpayload/libc/memory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/payloads/libpayload/libc/memory.c b/payloads/libpayload/libc/memory.c
index 57c31e0bb3..eb9fecc94c 100644
--- a/payloads/libpayload/libc/memory.c
+++ b/payloads/libpayload/libc/memory.c
@@ -107,8 +107,8 @@ void *memmove(void *dst, const void *src, size_t n)
* @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;
}