case argument to toupper to unsigned charm,

from Christian Biere <christianbiere@gmx.de> via NetBSD


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12007 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2003-04-14 11:26:27 +00:00
parent 23e5ef517e
commit 95a74c27a8

View File

@@ -46,13 +46,13 @@ RCSID("$Id$");
int int
strcasecmp(const char *s1, const char *s2) strcasecmp(const char *s1, const char *s2)
{ {
while(toupper(*s1) == toupper(*s2)) { while(toupper((unsigned char)*s1) == toupper((unsigned char)*s2)) {
if(*s1 == '\0') if(*s1 == '\0')
return 0; return 0;
s1++; s1++;
s2++; s2++;
} }
return toupper(*s1) - toupper(*s2); return toupper((unsigned char)*s1) - toupper((unsigned char)*s2);
} }
#endif #endif