From 485d6cf39247045495c6b6a39db930507eb93273 Mon Sep 17 00:00:00 2001 From: imp Date: Wed, 28 Mar 2007 21:15:50 +0000 Subject: Fix problem where memcmp would return true in the case where the character after the character that was the same. Submitted by: jhay --- sys/boot/arm/at91/libat91/memcmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/boot/arm/at91/libat91/memcmp.c b/sys/boot/arm/at91/libat91/memcmp.c index bc157cf..322042f 100644 --- a/sys/boot/arm/at91/libat91/memcmp.c +++ b/sys/boot/arm/at91/libat91/memcmp.c @@ -34,5 +34,5 @@ p_memcmp(const char *to, const char *from, unsigned size) while ((--size) && (*to++ == *from++)) continue; - return (*to != *from); + return (size || (*to != *from)); } -- cgit v1.1