Commit 80fbd0ee authored by NTH19's avatar NTH19 Committed by GitHub

Remove redundant variable (#2237)

parent bc563f1a
...@@ -176,7 +176,6 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length, ...@@ -176,7 +176,6 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length,
{ {
const uchar *map= cs->sort_order, *end; const uchar *map= cs->sort_order, *end;
size_t length; size_t length;
int res;
end= a + (length= MY_MIN(a_length, b_length)); end= a + (length= MY_MIN(a_length, b_length));
while (a < end) while (a < end)
...@@ -184,7 +183,6 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length, ...@@ -184,7 +183,6 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length,
if (map[*a++] != map[*b++]) if (map[*a++] != map[*b++])
return ((int) map[a[-1]] - (int) map[b[-1]]); return ((int) map[a[-1]] - (int) map[b[-1]]);
} }
res= 0;
if (a_length != b_length) if (a_length != b_length)
{ {
int swap= 1; int swap= 1;
...@@ -198,15 +196,14 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length, ...@@ -198,15 +196,14 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length,
a_length= b_length; a_length= b_length;
a= b; a= b;
swap= -1; /* swap sign of result */ swap= -1; /* swap sign of result */
res= -res;
} }
for (end= a + a_length-length; a < end ; a++) for (end= a + a_length-length; a < end ; a++)
{ {
if (map[*a] != map[' ']) if (map[*a] != map[' '])
return (map[*a] < map[' ']) ? -swap : swap; return (map[*a] < map[' ']) ? -swap : swap;
} }
} }
return res; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment