diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2019-07-26 18:08:14 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-07-26 23:56:40 +0300 |
commit | 8a35b540a99d909ee4680e773c1d3befb6bff782 (patch) | |
tree | dd0688662da9c25285c1af00bf3c22a5db91c7a9 /grep.c | |
parent | 685668faaae6daf5990068b198525491591aff87 (diff) |
grep: consistently use "p->fixed" in compile_regexp()
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'grep.c')
-rw-r--r-- | grep.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) { |