From 8a35b540a99d909ee4680e773c1d3befb6bff782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Fri, 26 Jul 2019 17:08:14 +0200 Subject: grep: consistently use "p->fixed" in compile_regexp() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At the start of this function we do: p->fixed = opt->fixed; It's less confusing to use that variable consistently that switch back & forth between the two. Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano diff --git a/grep.c b/grep.c index 9c2b259..b94e998 100644 --- a/grep.c +++ b/grep.c @@ -616,7 +616,7 @@ static void compile_regexp(struct grep_pat *p, struct grep_opt *opt) die(_("given pattern contains NULL byte (via -f ). This is only supported with -P under PCRE v2")); pat_is_fixed = is_fixed(p->pattern, p->patternlen); - if (opt->fixed || pat_is_fixed) { + if (p->fixed || pat_is_fixed) { #ifdef USE_LIBPCRE2 opt->pcre2 = 1; if (pat_is_fixed) { -- cgit v0.10.2-6-g49f6