summaryrefslogtreecommitdiffstats
path: root/generic/regc_nfa.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/regc_nfa.c')
-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 af0bf3f..2fc3a05 100644
--- a/generic/regc_nfa.c
+++ b/generic/regc_nfa.c
@@ -1383,6 +1383,9 @@ fixempties(
}
s->tmp = NULL;
}
+ if (NISERR()) {
+ return;
+ }
/*
* Remove all the EMPTY arcs, since we don't need them anymore.
@@ -1402,14 +1405,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);
}
}