summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--grep.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/grep.c b/grep.c
index 0e6511fe23..906406a182 100644
--- a/grep.c
+++ b/grep.c
@@ -454,10 +454,7 @@ static void compile_regexp(struct grep_pat *p, struct grep_opt *opt)
p->fixed = 0;
if (p->fixed) {
- if (opt->regflags & REG_ICASE || p->ignore_case)
- p->kws = kwsalloc(tolower_trans_tbl);
- else
- p->kws = kwsalloc(NULL);
+ p->kws = kwsalloc(icase ? tolower_trans_tbl : NULL);
kwsincr(p->kws, p->pattern, p->patternlen);
kwsprep(p->kws);
return;