Commit 4be8ed8e authored by Erik de Castro Lopo's avatar Erik de Castro Lopo
Browse files

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>
parent 71c95553
......@@ -56,7 +56,7 @@ static int ascii_strcasecmp(const char *s1, const char *s2)
char c1, c2;
for (;; s1++, s2++) {
if (!*s1 || !*s1)
if (!*s1 || !*s2)
break;
if (*s1 == *s2)
continue;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment