[PATCH v2 4/8] grep: consistently use "p->fixed" in compile_regexp()
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Jul 26, 2019, 15:08 UTC
- Message-ID
- <20190726150818.6373-5-avarab@gmail.com>
- In-Reply-To
- <20190724151415.3698-1-avarab@gmail.com>
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 <avarab@gmail.com> --- grep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grep.c b/grep.c index 9c2b259771..b94e998680 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 <file>). 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) {
-- 2.22.0.455.g172b71a6c5