Fix from Benjamin Riefenstahl <Benjamin.Riefenstahl@epost.de>. Revered
authorJeremy Allison <jra@samba.org>
Fri, 12 Sep 2003 21:41:18 +0000 (21:41 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 12 Sep 2003 21:41:18 +0000 (21:41 +0000)
condition meant fast-path in strchr_m was not being used. Doh !
Jeremy.

source/lib/util_str.c

index 57131ad873bfece3e1f8135dc2049d6b724a5673..c065bfe9db619a47841ce36273ca62a4c06d71b8 100644 (file)
@@ -1186,7 +1186,7 @@ char *strchr_m(const char *s, char c)
           supported multi-byte character sets are ascii-compatible
           (ie. they match for the first 128 chars) */
 
-       while (*s && (((unsigned char)s[0]) & 0x80)) {
+       while (*s && !(((unsigned char)s[0]) & 0x80)) {
                if (*s == c)
                        return s;
                s++;