From 695f95ba5dc4ab44f327574f85c3ebe7ebf449b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sat, 25 Jun 2016 07:22:38 +0200 Subject: grep.c: reuse "icase" variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- grep.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'grep.c') 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; -- cgit v1.2.3