Skip to content

Commit 8a35b54

Browse files
avargitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 685668f commit 8a35b54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

grep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ static void compile_regexp(struct grep_pat *p, struct grep_opt *opt)
616616
die(_("given pattern contains NULL byte (via -f <file>). This is only supported with -P under PCRE v2"));
617617

618618
pat_is_fixed = is_fixed(p->pattern, p->patternlen);
619-
if (opt->fixed || pat_is_fixed) {
619+
if (p->fixed || pat_is_fixed) {
620620
#ifdef USE_LIBPCRE2
621621
opt->pcre2 = 1;
622622
if (pat_is_fixed) {

0 commit comments

Comments
 (0)