src/share/utf8/charset.c : Fix typo in conditional.

Typo in the conditional to check the exit condition in ascii_strcasecmp.
It checks for (!*s1 || !*s1) instead of (!*s1 || !*s2). The typo did
not affect the result of the function as the loop  is exited before
changing s1 or s2 anyway.

The problem was found by cppcheck which is run automatically on the
Debian sources. Results here:
http://cppcheck.sourceforge.net/devinfo/daca2-cppcheck1.63/daca2.html

Patch-from: Robert Kausch <robert.kausch@freac.org>
This commit is contained in:
Erik de Castro Lopo
2014-02-03 18:48:24 +11:00
parent 71c9555366
commit 4be8ed8efe

View File

@@ -56,7 +56,7 @@ static int ascii_strcasecmp(const char *s1, const char *s2)
char c1, c2; char c1, c2;
for (;; s1++, s2++) { for (;; s1++, s2++) {
if (!*s1 || !*s1) if (!*s1 || !*s2)
break; break;
if (*s1 == *s2) if (*s1 == *s2)
continue; continue;