grep: remove redundant "fixed" field re-assignment to 0
Remove the redundant re-assignment of the fixed field to zero right after the entire struct has been set to zero via memset(...). Unlike some nearby commits this pattern doesn't date back to the pattern described ine0b9f8ae09
("grep: remove redundant regflags assignments", 2017-05-25), instead it was apparently cargo-culted in9eceddeec6
("Use kwset in grep", 2011-08-21). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
c7e3855112
commit
885ef80d39
2
grep.c
2
grep.c
@ -626,8 +626,6 @@ static void compile_regexp(struct grep_pat *p, struct grep_opt *opt)
|
||||
has_null(p->pattern, p->patternlen) ||
|
||||
is_fixed(p->pattern, p->patternlen))
|
||||
p->fixed = !icase || ascii_only;
|
||||
else
|
||||
p->fixed = 0;
|
||||
|
||||
if (p->fixed) {
|
||||
p->kws = kwsalloc(icase ? tolower_trans_tbl : NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user