Skip to content

Commit 1cfc5a8

Browse files
avargitster
authored andcommitted
grep/pcre2: drop needless assignment to NULL
Remove a redundant assignment of pcre2_compile_context dating back to my 94da919 (grep: add support for PCRE v2, 2017-06-01). In create_grep_pat() we xcalloc() the "grep_pat" struct, so there's no need to NULL out individual members here. I think this was probably something left over from an earlier development version of mine. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0ddf8ce commit 1cfc5a8

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

grep.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,6 @@ static void compile_pcre2_pattern(struct grep_pat *p, const struct grep_opt *opt
373373
int patinforet;
374374
size_t jitsizearg;
375375

376-
p->pcre2_compile_context = NULL;
377-
378376
/* pcre2_global_context is initialized in append_grep_pattern */
379377
if (opt->ignore_case) {
380378
if (!opt->ignore_locale && has_non_ascii(p->pattern)) {

0 commit comments

Comments
 (0)