Date: Sun, 2 Apr 2017 14:02:10 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316418 - head/bin/sh Message-ID: <201704021402.v32E2A7m019512@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Sun Apr 2 14:02:10 2017 New Revision: 316418 URL: https://svnweb.freebsd.org/changeset/base/316418 Log: sh: Remove global state from collate_range_cmp(). The global state is not used across invocations of collate_range_cmp(). Modified: head/bin/sh/expand.c Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Sun Apr 2 13:43:45 2017 (r316417) +++ head/bin/sh/expand.c Sun Apr 2 14:02:10 2017 (r316418) @@ -145,10 +145,12 @@ appendarglist(struct arglist *list, char 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)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704021402.v32E2A7m019512>