summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/regc_nfa.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/regc_nfa.c b/generic/regc_nfa.c
index 2fe2b27..fc0c823 100644
--- a/generic/regc_nfa.c
+++ b/generic/regc_nfa.c
@@ -1396,6 +1396,9 @@ fixempties(
}
s->tmp = NULL;
}
+ if (NISERR()) {
+ return;
+ }
/*
* Remove all the EMPTY arcs, since we don't need them anymore.
@@ -1415,14 +1418,14 @@ fixempties(
* combine it with the previous step; but cleanup() will take care
* of anything we miss.)
*/
- for (s = nfa->states; s != NULL && !NISERR(); s = nexts) {
+ for (s = nfa->states; s != NULL; s = nexts) {
nexts = s->next;
if ((s->nins == 0 || s->nouts == 0) && !s->flag) {
dropstate(nfa, s);
}
}
- if (f != NULL && !NISERR()) {
+ if (f != NULL) {
dumpnfa(nfa, f);
}
}