mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Remove redundant variable (#2237)
This commit is contained in:
@@ -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,
|
|||||||
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,
|
|||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user