diff options
author | Simo Sorce <idra@samba.org> | 2006-02-04 08:55:35 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:51:45 -0500 |
commit | 3f04b896e717e3f329f8ab5e8bcb921e40ad0895 (patch) | |
tree | 2b2e9bc996b05e0f40b8b9fbbc353051fd7d1785 | |
parent | 3ba24e4a35156a36f900cdbdbbef770861e9c7eb (diff) | |
download | samba-3f04b896e717e3f329f8ab5e8bcb921e40ad0895.tar.gz samba-3f04b896e717e3f329f8ab5e8bcb921e40ad0895.tar.bz2 samba-3f04b896e717e3f329f8ab5e8bcb921e40ad0895.zip |
r13336: Doh! We actually never optimized for the ascii case.
In the 3.0 branches it is fixed this but we missed it for samba4
(This used to be commit baccb3c9147e161a6d2cbe371a60bf2ddcc0585c)
-rw-r--r-- | source4/lib/util_str.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/lib/util_str.c b/source4/lib/util_str.c index 6da0063c50..b46787e3ea 100644 --- a/source4/lib/util_str.c +++ b/source4/lib/util_str.c @@ -796,7 +796,7 @@ void strlower_m(char *s) fast. We optimise for the ascii case, knowing that all our supported multi-byte character sets are ascii-compatible (ie. they match for the first 128 chars) */ - while (*s && !(((uint8_t)s[0]) & 0x7F)) { + while (*s && !(((uint8_t)*s) & 0x80)) { *s = tolower((uint8_t)*s); s++; } @@ -832,7 +832,7 @@ void strupper_m(char *s) fast. We optimise for the ascii case, knowing that all our supported multi-byte character sets are ascii-compatible (ie. they match for the first 128 chars) */ - while (*s && !(((uint8_t)s[0]) & 0x7F)) { + while (*s && !(((uint8_t)*s) & 0x80)) { *s = toupper((uint8_t)*s); s++; } @@ -870,7 +870,7 @@ size_t strlen_m(const char *s) return 0; } - while (*s && !(((uint8_t)s[0]) & 0x7F)) { + while (*s && !(((uint8_t)*s) & 0x80)) { s++; count++; } |