Skip to content

Commit 3625c30

Browse files
committed
rm redundant variable
1 parent 04aab82 commit 3625c30

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
@@ -175,15 +175,13 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length,
175175
{
176176
const uchar *map= cs->sort_order, *end;
177177
size_t length;
178-
int res;
179178

180179
end= a + (length= MY_MIN(a_length, b_length));
181180
while (a < end)
182181
{
183182
if (map[*a++] != map[*b++])
184183
return ((int) map[a[-1]] - (int) map[b[-1]]);
185184
}
186-
res= 0;
187185
if (a_length != b_length)
188186
{
189187
int swap= 1;
@@ -197,15 +195,14 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length,
197195
a_length= b_length;
198196
a= b;
199197
swap= -1; /* swap sign of result */
200-
res= -res;
201198
}
202199
for (end= a + a_length-length; a < end ; a++)
203200
{
204201
if (map[*a] != map[' '])
205-
return (map[*a] < map[' ']) ? -swap : swap;
202+
return (map[*a] < map[' ']) ? -swap : swap;
206203
}
207204
}
208-
return res;
205+
return 0;
209206
}
210207

211208

0 commit comments

Comments
 (0)