summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2012-01-03 11:22:09 +0100
committerPaolo Bonzini <bonzini@gnu.org>2012-02-05 17:28:20 +0100
commitba63674a816d93ee4a69d0c78a34a7d9b391d33b (patch)
tree56048b86e8bbbbfdb4d3372a1932cb3a902edc0b
parent75b74e442f993c03e6af8b9e2e74cd657e6cce14 (diff)
downloadgrep-ba63674a816d93ee4a69d0c78a34a7d9b391d33b.tar.gz
dfa: remove useless check
* src/dfa.c (state_index): There is nothing that is a newline *and* a letter. Remove redundant call to SUCCEEDS_IN_CONTEXT.
-rw-r--r--src/dfa.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/dfa.c b/src/dfa.c
index 6ab0ab49..ac3fb181 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -1964,8 +1964,7 @@ state_index (struct dfa *d, position_set const *s, int newline, int letter)
constraint = s->elems[j].constraint;
if (SUCCEEDS_IN_CONTEXT(constraint, newline, 0, letter, 0)
|| SUCCEEDS_IN_CONTEXT(constraint, newline, 0, letter, 1)
- || SUCCEEDS_IN_CONTEXT(constraint, newline, 1, letter, 0)
- || SUCCEEDS_IN_CONTEXT(constraint, newline, 1, letter, 1))
+ || SUCCEEDS_IN_CONTEXT(constraint, newline, 1, letter, 0))
d->states[i].constraint |= constraint;
if (! d->states[i].first_end)
d->states[i].first_end = d->tokens[s->elems[j].index];