sh: Remove global state from collate_range_cmp().
The global state is not used across invocations of collate_range_cmp().
This commit is contained in:
parent
e59833ccfe
commit
c39d3320ab
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=316418
@ -145,10 +145,12 @@ appendarglist(struct arglist *list, char *str)
|
|||||||
static int
|
static int
|
||||||
collate_range_cmp(wchar_t c1, wchar_t c2)
|
collate_range_cmp(wchar_t c1, wchar_t c2)
|
||||||
{
|
{
|
||||||
static wchar_t s1[2], s2[2];
|
wchar_t s1[2], s2[2];
|
||||||
|
|
||||||
s1[0] = c1;
|
s1[0] = c1;
|
||||||
|
s1[1] = L'\0';
|
||||||
s2[0] = c2;
|
s2[0] = c2;
|
||||||
|
s2[1] = L'\0';
|
||||||
return (wcscoll(s1, s2));
|
return (wcscoll(s1, s2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user