From: Nguyễn Thái Ngọc Duy Date: Sun, 14 Feb 2016 11:49:46 GMT Subject: [PATCH v7 02/12] grep: break down an "if" stmt in preparation for next changes Message-ID: <1455450596-11904-3-git-send-email-pclouds@gmail.com> In-Reply-To: <1455450596-11904-1-git-send-email-pclouds@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy --- grep.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/grep.c b/grep.c index 7b2b96a..609f218 100644 --- a/grep.c +++ b/grep.c @@ -403,7 +403,9 @@ static void compile_regexp(struct grep_pat *p, struct grep_opt *opt) p->word_regexp = opt->word_regexp; p->ignore_case = opt->ignore_case; - if (opt->fixed || is_fixed(p->pattern, p->patternlen)) + if (opt->fixed) { + p->fixed = 1; + } else if (is_fixed(p->pattern, p->patternlen)) p->fixed = 1; else p->fixed = 0; -- 2.7.0.377.g4cd97dd