Simplified the stricmp function.
This commit is contained in:
@@ -42,10 +42,12 @@ int stricmp(const char *s1, const char *s2)
|
||||
unsigned char c1,c2;
|
||||
|
||||
do {
|
||||
c1 = *s1++;
|
||||
c2 = *s2++;
|
||||
c1 = *s1;
|
||||
c2 = *s2;
|
||||
c1 = (unsigned char) tolower( (unsigned char) c1);
|
||||
c2 = (unsigned char) tolower( (unsigned char) c2);
|
||||
s1++;
|
||||
s2++;
|
||||
} while((c1 == c2) && (c1 != '\0'));
|
||||
|
||||
return (int) c1-c2;
|
||||
|
||||
Reference in New Issue
Block a user