From 4be8ed8efe51844388f5e90042db4bafc4de82a3 Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Mon, 3 Feb 2014 18:48:24 +1100 Subject: [PATCH] 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 --- src/share/utf8/charset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/share/utf8/charset.c b/src/share/utf8/charset.c index cfde5621..bd71f468 100644 --- a/src/share/utf8/charset.c +++ b/src/share/utf8/charset.c @@ -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;