diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-03-01 10:19:42 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-03-01 10:19:42 +0100 |
commit | 8dce8ecfda303e15daf2832d90de024a6acf8e7e (patch) | |
tree | 2373fe6c4574fb7cdc1ac0a28336f6e207393acc /strings/ctype-mb.c | |
parent | 45236704e871fcd9a23887464a8ff934c827b84f (diff) | |
download | mariadb-git-8dce8ecfda303e15daf2832d90de024a6acf8e7e.tar.gz |
minor cleanup
Diffstat (limited to 'strings/ctype-mb.c')
-rw-r--r-- | strings/ctype-mb.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c index c6f280dfc17..f4e70fd1dd5 100644 --- a/strings/ctype-mb.c +++ b/strings/ctype-mb.c @@ -680,18 +680,16 @@ void my_hash_sort_mb_bin(CHARSET_INFO *cs __attribute__((unused)), const uchar *key, size_t len,ulong *nr1, ulong *nr2) { - const uchar *pos = key; - /* Remove trailing spaces. We have to do this to be able to compare 'A ' and 'A' as identical */ - key= skip_trailing_space(key, len); + const uchar *end = skip_trailing_space(key, len); - for (; pos < (uchar*) key ; pos++) + for (; key < end ; key++) { nr1[0]^=(ulong) ((((uint) nr1[0] & 63)+nr2[0]) * - ((uint)*pos)) + (nr1[0] << 8); + ((uint)*key)) + (nr1[0] << 8); nr2[0]+=3; } } |