aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/sort
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2020-09-10 15:37:19 +0000
committerAlex Richardson <arichardson@FreeBSD.org>2020-09-10 15:37:19 +0000
commit266b51ac6e24a71a4df54c30f63215bf1c3decdb (patch)
tree21e5857c4b2bbbacb98db99451e758d8febeebae /usr.bin/sort
parent9373ca5879f822ac6e4b39e951d39e4d0173f188 (diff)
Notes
Diffstat (limited to 'usr.bin/sort')
-rw-r--r--usr.bin/sort/bwstring.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/sort/bwstring.c b/usr.bin/sort/bwstring.c
index 69d5dff182ecb..cab21324c4b36 100644
--- a/usr.bin/sort/bwstring.c
+++ b/usr.bin/sort/bwstring.c
@@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$");
bool byte_sort;
static wchar_t **wmonths;
-static unsigned char **cmonths;
+static char **cmonths;
/* initialise months */
@@ -56,17 +56,17 @@ initialise_months(void)
const nl_item item[12] = { ABMON_1, ABMON_2, ABMON_3, ABMON_4,
ABMON_5, ABMON_6, ABMON_7, ABMON_8, ABMON_9, ABMON_10,
ABMON_11, ABMON_12 };
- unsigned char *tmp;
+ char *tmp;
size_t len;
if (MB_CUR_MAX == 1) {
if (cmonths == NULL) {
- unsigned char *m;
+ char *m;
- cmonths = sort_malloc(sizeof(unsigned char*) * 12);
+ cmonths = sort_malloc(sizeof(char*) * 12);
for (int i = 0; i < 12; i++) {
cmonths[i] = NULL;
- tmp = (unsigned char *) nl_langinfo(item[i]);
+ tmp = nl_langinfo(item[i]);
if (debug_sort)
printf("month[%d]=%s\n", i, tmp);
if (*tmp == '\0')
@@ -86,14 +86,14 @@ initialise_months(void)
wmonths = sort_malloc(sizeof(wchar_t *) * 12);
for (int i = 0; i < 12; i++) {
wmonths[i] = NULL;
- tmp = (unsigned char *) nl_langinfo(item[i]);
+ tmp = nl_langinfo(item[i]);
if (debug_sort)
printf("month[%d]=%s\n", i, tmp);
if (*tmp == '\0')
continue;
len = strlen(tmp);
m = sort_malloc(SIZEOF_WCHAR_STRING(len + 1));
- if (mbstowcs(m, (char*)tmp, len) ==
+ if (mbstowcs(m, tmp, len) ==
((size_t) - 1)) {
sort_free(m);
continue;