From 12bc7ed391aec31cb6a7e0fd7478ee21caec2bfb Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 23 Nov 1993 15:35:08 +0000 Subject: [PATCH] Changed as suggested by Frans Meulenbroeks --- lang/cem/libcc.ansi/string/memcmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/cem/libcc.ansi/string/memcmp.c b/lang/cem/libcc.ansi/string/memcmp.c index 93b97e72e..f7295f071 100644 --- a/lang/cem/libcc.ansi/string/memcmp.c +++ b/lang/cem/libcc.ansi/string/memcmp.c @@ -9,13 +9,13 @@ int memcmp(const void *s1, const void *s2, size_t n) { - register const char *p1 = s1, *p2 = s2; + register const unsigned char *p1 = s1, *p2 = s2; if (n) { n++; while (--n > 0) { if (*p1++ == *p2++) continue; - return (unsigned char) *--p1 - (unsigned char) *--p2; + return *--p1 - *--p2; } } return 0;