summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-11-19 09:33:48 (GMT)
committerPaul Eggert <eggert@cs.ucla.edu>2016-11-19 09:34:17 (GMT)
commit92b41d7e9c4df1e3cbcdb3fcc955636e76edb8cf (patch)
treea0789746979eee493fa7b32893d7591f270378de
parentf028b70e4eac297ce37b306fbdc18efbf09f2e4a (diff)
downloadgrep-92b41d7e9c4df1e3cbcdb3fcc955636e76edb8cf.zip
grep-92b41d7e9c4df1e3cbcdb3fcc955636e76edb8cf.tar.gz
grep-92b41d7e9c4df1e3cbcdb3fcc955636e76edb8cf.tar.bz2
grep: fix performance typo with -P
Reported by Zev Weiss in: http://bugs.gnu.org/22655#88 * src/pcresearch.c (Pcompile): Initialize reflags.
-rw-r--r--src/pcresearch.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pcresearch.c b/src/pcresearch.c
index 9a13d97..439945a 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -176,6 +176,7 @@ Pcompile (char const *pattern, size_t size)
if (match_lines)
strcpy (n, xsuffix);
+ reflags = flags;
cre = pcre_compile (re, flags, &ep, &e, pcre_maketables ());
if (!cre)
die (EXIT_TROUBLE, 0, "%s", ep);