summaryrefslogtreecommitdiffstats
path: root/usr.bin/grep/regex/tre-fastmatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/grep/regex/tre-fastmatch.c')
-rw-r--r--usr.bin/grep/regex/tre-fastmatch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/grep/regex/tre-fastmatch.c b/usr.bin/grep/regex/tre-fastmatch.c
index b7a7c91..4b58900 100644
--- a/usr.bin/grep/regex/tre-fastmatch.c
+++ b/usr.bin/grep/regex/tre-fastmatch.c
@@ -395,7 +395,7 @@ static int fastcmp(const fastmatch_t *fg, const void *data,
if (p == NULL) \
return REG_ESPACE; \
for (unsigned int i = 0; i < plen; i++) \
- p[i] = tolower(pat[i]); \
+ p[i] = tolower((unsigned char)pat[i]); \
_CALC_BMGS(arr, p, plen); \
xfree(p); \
} \
@@ -1030,7 +1030,7 @@ fastcmp(const fastmatch_t *fg, const void *data, tre_str_type_t type)
continue;
/* Compare */
- if (fg->icase ? (tolower(pat_byte[i]) == tolower(str_byte[i]))
+ if (fg->icase ? (tolower((unsigned char)pat_byte[i]) == tolower((unsigned char)str_byte[i]))
: (pat_byte[i] == str_byte[i]))
continue;
}
OpenPOWER on IntegriCloud