grep: remove redundant double assignment to 0
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 29 Jun 2017 22:22:17 +0000 (22:22 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 30 Jun 2017 17:06:24 +0000 (10:06 -0700)
Stop assigning 0 to the extended_regexp_option field right after we've
zeroed out the entire struct with memset() just a few lines earlier.

Unlike some of the code being refactored in subsequent commits, this
was always completely redundant. See the original code introduced in
84befcd0a4 ("grep: add a grep.patternType configuration setting",
2012-08-03).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
grep.c
diff --git a/grep.c b/grep.c
index 98733db623ae2a0c4b3c11b71e3560429ec975ff..29439886e793b9c54d46ccab99d2c9412edd2039 100644 (file)
--- a/grep.c
+++ b/grep.c
@@ -38,7 +38,6 @@ void init_grep_defaults(void)
        opt->regflags = REG_NEWLINE;
        opt->max_depth = -1;
        opt->pattern_type_option = GREP_PATTERN_TYPE_UNSPECIFIED;
-       opt->extended_regexp_option = 0;
        color_set(opt->color_context, "");
        color_set(opt->color_filename, "");
        color_set(opt->color_function, "");