From af38e153c3de3710b7e828f52869b446c73c808d Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 6 Jun 2016 18:44:26 +0300 Subject: Sync dfa.c with GNU grep. --- ChangeLog | 4 ++++ dfa.c | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7c42d77a..bbc4c94d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2016-06-05 Arnold D. Robbins + + * dfa.c: Sync with GNU grep. + 2016-06-01 Arnold D. Robbins * nonposix.h (getpgrp): Wrap declaration in ifdef so it doesn't diff --git a/dfa.c b/dfa.c index 3156e5e7..a41914e0 100644 --- a/dfa.c +++ b/dfa.c @@ -3411,8 +3411,7 @@ dfaexec_main (struct dfa *d, char const *begin, char *end, bool allow_nl, s = allow_nl ? d->newlines[s1] : 0; } - - if (d->fails[s]) + else if (d->fails[s]) { if (d->success[s] & sbit[*p]) goto done; @@ -3425,8 +3424,7 @@ dfaexec_main (struct dfa *d, char const *begin, char *end, bool allow_nl, } else { - if (!d->trans[s]) - build_state (s, d); + build_state (s, d); trans = d->trans; } } -- cgit v1.2.3