From 1e315c902244c7f4baafa0632b54fd95f3e1da06 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 20 Dec 2002 05:49:40 +0000 Subject: 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 --- sys/boot/i386/boot2/boot2.c | 2 +- sys/boot/i386/gptboot/gptboot.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/boot') diff --git a/sys/boot/i386/boot2/boot2.c b/sys/boot/i386/boot2/boot2.c index 7850bc178437..4f6229674c0c 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 7850bc178437..4f6229674c0c 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" -- cgit v1.3