1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Remove redundant variable (#2237)

This commit is contained in:
NTH19
2022-08-27 17:19:16 +08:00
committed by GitHub
parent bc563f1a4b
commit 80fbd0ee94

View File

@@ -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,7 +196,6 @@ 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++)
{ {
@@ -206,7 +203,7 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length,
return (map[*a] < map[' ']) ? -swap : swap; return (map[*a] < map[' ']) ? -swap : swap;
} }
} }
return res; return 0;
} }