X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=grep.c;h=190139cfcd0d61f364a88010fe1dd6e71e26f9e2;hb=HEAD;hp=f492d267cc157d46f899c70d01ea707d737d27ae;hpb=92b7aacbbc654de4cfae6806bc92cf81ec1823aa;p=git.git diff --git a/grep.c b/grep.c index f492d267c..190139cfc 100644 --- a/grep.c +++ b/grep.c @@ -168,15 +168,10 @@ 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) { - static char trans[256]; - int i; - for (i = 0; i < 256; i++) - trans[i] = tolower(i); - p->kws = kwsalloc(trans); - } else { + if (opt->regflags & REG_ICASE || p->ignore_case) + p->kws = kwsalloc(tolower_trans_tbl); + else p->kws = kwsalloc(NULL); - } kwsincr(p->kws, p->pattern, p->patternlen); kwsprep(p->kws); return;