summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2007-03-28 21:15:50 +0000
committerimp <imp@FreeBSD.org>2007-03-28 21:15:50 +0000
commit485d6cf39247045495c6b6a39db930507eb93273 (patch)
tree4f759bab374b8b890cc7d8ba3a48377b97b5b21f /sys/boot
parentc38f335208261209eeb4f6607f8bf4b9aeeefa97 (diff)
downloadFreeBSD-src-485d6cf39247045495c6b6a39db930507eb93273.zip
FreeBSD-src-485d6cf39247045495c6b6a39db930507eb93273.tar.gz
Fix problem where memcmp would return true in the case where the
character after the character that was the same. Submitted by: jhay
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/arm/at91/libat91/memcmp.c2
1 files changed, 1 insertions, 1 deletions
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));
}
OpenPOWER on IntegriCloud