Skip to content

Commit 60452a3

Browse files
pcloudsgitster
authored andcommitted
grep: break down an "if" stmt in preparation for next changes
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ff4ea60 commit 60452a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

grep.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,9 @@ static void compile_regexp(struct grep_pat *p, struct grep_opt *opt)
403403
p->word_regexp = opt->word_regexp;
404404
p->ignore_case = opt->ignore_case;
405405

406-
if (opt->fixed || is_fixed(p->pattern, p->patternlen))
406+
if (opt->fixed)
407+
p->fixed = 1;
408+
else if (is_fixed(p->pattern, p->patternlen))
407409
p->fixed = 1;
408410
else
409411
p->fixed = 0;

0 commit comments

Comments
 (0)