aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2017-04-02 14:02:10 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2017-04-02 14:02:10 +0000
commitc39d3320ab681401a3644401928e8be40f13afd9 (patch)
tree4be3ae1809111ae974919dc072c90808270c7c4a /bin
parente59833ccfe7b9972758fa9efa87f79e8393a0db4 (diff)
downloadsrc-c39d3320ab681401a3644401928e8be40f13afd9.tar.gz
src-c39d3320ab681401a3644401928e8be40f13afd9.zip
sh: Remove global state from collate_range_cmp().
The global state is not used across invocations of collate_range_cmp().
Notes
Notes: svn path=/head/; revision=316418
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/expand.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/sh/expand.c b/bin/sh/expand.c
index 3b6a45d08818..af88771babe1 100644
--- a/bin/sh/expand.c
+++ b/bin/sh/expand.c
@@ -145,10 +145,12 @@ appendarglist(struct arglist *list, char *str)
static int
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[1] = L'\0';
s2[0] = c2;
+ s2[1] = L'\0';
return (wcscoll(s1, s2));
}