summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2002-12-20 05:49:40 +0000
committerimp <imp@FreeBSD.org>2002-12-20 05:49:40 +0000
commitcaafad42bbbf503f1f0db4c093c9659f65738f8c (patch)
treec24d3a6202edbcf1079db8a8af6e065aaa15ce8c /sys/boot
parentdd4db7d1b455ba8fe80d98cc9d4f657ba9cc7138 (diff)
downloadFreeBSD-src-caafad42bbbf503f1f0db4c093c9659f65738f8c.zip
FreeBSD-src-caafad42bbbf503f1f0db4c093c9659f65738f8c.tar.gz
Put back the casts to unsigned. While no strictly necessary for its
current uses, the name strcmp has strong connotations that shouldn't lightly be discarded. This doesn't cost us anything. Submitted by: bde
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/i386/boot2/boot2.c2
-rw-r--r--sys/boot/i386/gptboot/gptboot.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/boot/i386/boot2/boot2.c b/sys/boot/i386/boot2/boot2.c
index 7850bc1..4f622967 100644
--- a/sys/boot/i386/boot2/boot2.c
+++ b/sys/boot/i386/boot2/boot2.c
@@ -133,7 +133,7 @@ static inline int
strcmp(const char *s1, const char *s2)
{
for (; *s1 == *s2 && *s1; s1++, s2++);
- return *s1 - *s2;
+ return (unsigned char)*s1 - (unsigned char)*s2;
}
#include "ufsread.c"
diff --git a/sys/boot/i386/gptboot/gptboot.c b/sys/boot/i386/gptboot/gptboot.c
index 7850bc1..4f622967 100644
--- a/sys/boot/i386/gptboot/gptboot.c
+++ b/sys/boot/i386/gptboot/gptboot.c
@@ -133,7 +133,7 @@ static inline int
strcmp(const char *s1, const char *s2)
{
for (; *s1 == *s2 && *s1; s1++, s2++);
- return *s1 - *s2;
+ return (unsigned char)*s1 - (unsigned char)*s2;
}
#include "ufsread.c"
OpenPOWER on IntegriCloud