summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2017-02-06 14:37:43 -0500
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2017-02-06 14:37:43 -0500
commit1a76fd11f501d0bf762e01661d8a67c18c3e01bd (patch)
tree122c31687bfac13934fd994108d9654b016f5001
parent7e1c1f9f779aa4d55c3cbc9e16a9f8f2884dd3fe (diff)
downloadroux-1a76fd11f501d0bf762e01661d8a67c18c3e01bd.tar.gz
robustness fix in fillfron()
This makes it possible to call it several times in a row.
-rw-r--r--cfg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cfg.c b/cfg.c
index 3b0c5bb..5385811 100644
--- a/cfg.c
+++ b/cfg.c
@@ -219,6 +219,8 @@ fillfron(Fn *fn)
 {
 	Blk *a, *b;
 
+	for (b=fn->start; b; b=b->link)
+		b->nfron = 0;
 	for (b=fn->start; b; b=b->link) {
 		if (b->s1)
 			for (a=b; !sdom(a, b->s1); a=a->idom)