Skip to content

Commit 2589096

Browse files
committed
rm redundant variable
1 parent bc563f1 commit 2589096

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

strings/ctype-simple.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,13 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length,
176176
{
177177
const uchar *map= cs->sort_order, *end;
178178
size_t length;
179-
int res;
180179

181180
end= a + (length= MY_MIN(a_length, b_length));
182181
while (a < end)
183182
{
184183
if (map[*a++] != map[*b++])
185184
return ((int) map[a[-1]] - (int) map[b[-1]]);
186185
}
187-
res= 0;
188186
if (a_length != b_length)
189187
{
190188
int swap= 1;
@@ -198,15 +196,14 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length,
198196
a_length= b_length;
199197
a= b;
200198
swap= -1; /* swap sign of result */
201-
res= -res;
202199
}
203200
for (end= a + a_length-length; a < end ; a++)
204201
{
205202
if (map[*a] != map[' '])
206-
return (map[*a] < map[' ']) ? -swap : swap;
203+
return (map[*a] < map[' ']) ? -swap : swap;
207204
}
208205
}
209-
return res;
206+
return 0;
210207
}
211208

212209

0 commit comments

Comments
 (0)