grep: remove redundant "fixed" field re-assignment to 0
[gitweb.git] / grep.c
diff --git a/grep.c b/grep.c
index 98733db623ae2a0c4b3c11b71e3560429ec975ff..86dc9b696f8b57052c0321f9667cdbc9296190b5 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, "");
@@ -79,10 +78,7 @@ int grep_config(const char *var, const char *value, void *cb)
                return -1;
 
        if (!strcmp(var, "grep.extendedregexp")) {
-               if (git_config_bool(var, value))
-                       opt->extended_regexp_option = 1;
-               else
-                       opt->extended_regexp_option = 0;
+               opt->extended_regexp_option = git_config_bool(var, value);
                return 0;
        }
 
@@ -630,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);