diff options
author | unknown <bar@mysql.com> | 2007-03-29 10:32:38 +0500 |
---|---|---|
committer | unknown <bar@mysql.com> | 2007-03-29 10:32:38 +0500 |
commit | ee0475bf5d5b9256d599aa6b9dcc641d4857d301 (patch) | |
tree | 3606ee631d829136afda195a23d95dda7f1c7c1b /strings | |
parent | 6370f6226f69e69be060fbe884f58b6dc9389ecf (diff) | |
download | mariadb-git-ee0475bf5d5b9256d599aa6b9dcc641d4857d301.tar.gz |
Code layout fix for bug N 27079
Thanks to Gluh for suggestion.
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-uca.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c index 3aad36f858c..1263882846d 100644 --- a/strings/ctype-uca.c +++ b/strings/ctype-uca.c @@ -6777,25 +6777,24 @@ static void my_uca_scanner_init_ucs2(my_uca_scanner *scanner, scanner->uca_length= cs->sort_order; scanner->uca_weight= cs->sort_order_big; scanner->contractions= cs->contractions; + return; } - else - { - /* - Sometimes this function is called with - str=NULL and length=0, which should be - considered as an empty string. - - The above initialization is unsafe for such cases, - because scanner->send is initialized to (NULL-2), which is 0xFFFFFFFE. - Then we fall into an endless loop in my_uca_scanner_next_ucs2(). + + /* + Sometimes this function is called with + str=NULL and length=0, which should be + considered as an empty string. + + The above initialization is unsafe for such cases, + because scanner->send is initialized to (NULL-2), which is 0xFFFFFFFE. + Then we fall into an endless loop in my_uca_scanner_next_ucs2(). - Do special initialization for the case when length=0. - Initialize scanner->sbeg to an address greater than scanner->send. - Next call of my_uca_scanner_next_ucs2() will correctly return with -1. - */ - scanner->sbeg= (uchar*) &nochar[1]; - scanner->send= (uchar*) &nochar[0]; - } + Do special initialization for the case when length=0. + Initialize scanner->sbeg to an address greater than scanner->send. + Next call of my_uca_scanner_next_ucs2() will correctly return with -1. + */ + scanner->sbeg= (uchar*) &nochar[1]; + scanner->send= (uchar*) &nochar[0]; } |