diff options
author | imp <imp@FreeBSD.org> | 2007-03-28 21:15:50 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2007-03-28 21:15:50 +0000 |
commit | 485d6cf39247045495c6b6a39db930507eb93273 (patch) | |
tree | 4f759bab374b8b890cc7d8ba3a48377b97b5b21f /sys/boot | |
parent | c38f335208261209eeb4f6607f8bf4b9aeeefa97 (diff) | |
download | FreeBSD-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.c | 2 |
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)); } |