X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=grep.c;h=1030f38f53f2cf3e3efcd70049d4c2efa575c14b;hb=0f871cf56e83d13116b021295688e57f26bbf93d;hp=b29d09c7f6a5a7f9621fb5287eb07e72ece7f484;hpb=d0482e88a735787f7bb33ef4783be0e7f6a70946;p=git.git diff --git a/grep.c b/grep.c index b29d09c7f..1030f38f5 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;