From ad7f617071a697e121681d5c9e18c84068ae2fa8 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sat, 10 Aug 2013 19:02:49 -0600 Subject: [PATCH] regcomp.c: Skip calculating a pass2 value in pass1 The result of this value at the end of the loop is discarded in pass1 of the regex compilation, so don't bother to calculate it. --- regcomp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regcomp.c b/regcomp.c index 91765f0..4995353 100644 --- a/regcomp.c +++ b/regcomp.c @@ -10773,8 +10773,8 @@ tryagain: /* We do the EXACTFish to EXACT node only if folding, and not if in * locale, as whether a character folds or not isn't known until - * runtime */ - maybe_exact = FOLD && ! LOC; + * runtime. (And we don't need to figure this out until pass 2) */ + maybe_exact = FOLD && ! LOC && PASS2; /* XXX The node can hold up to 255 bytes, yet this only goes to * 127. I (khw) do not know why. Keeping it somewhat less than -- 2.7.4