{"thread":{"id":"22507","subject":"[PATCH] grep: simplify assignment of ->fixed","startedAt":"2010-02-03T18:16:30Z","lastAt":"2010-02-03T18:16:30Z","messageCount":1,"participants":["René Scharfe"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"133491","messageId":"4B69BD7E.1040204@lsrfire.ath.cx","threadId":"22507","inReplyTo":null,"subject":"[PATCH] grep: simplify assignment of ->fixed","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2010-02-03T18:16:30Z","receivedAt":"2010-02-03T18:16:30Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"After 885d211e, the value of the ->fixed pattern option only depends on\nthe grep option of the same name.  Regex flags don't matter any more,\nbecause fixed mode and regex mode are strictly separated.  Thus we can\nsimply copy the value from struct grep_opt to struct grep_pat, as we do\nalready for ->word_regexp and ->ignore_case.\n\nSigned-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n---\n grep.c |    5 +----\n 1 files changed, 1 insertions(+), 4 deletions(-)\n\ndiff --git a/grep.c b/grep.c\nindex 60cce46..a0864f1 100644\n--- a/grep.c\n+++ b/grep.c\n@@ -57,11 +57,8 @@ static void compile_regexp(struct grep_pat *p, struct grep_opt *opt)\n \n \tp->word_regexp = opt->word_regexp;\n \tp->ignore_case = opt->ignore_case;\n+\tp->fixed = opt->fixed;\n \n-\tif (opt->fixed)\n-\t\tp->fixed = 1;\n-\tif (opt->regflags & REG_ICASE)\n-\t\tp->fixed = 0;\n \tif (p->fixed)\n \t\treturn;\n \n-- \n1.7.0.rc1\n"}]}