summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mi/cfg.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mi/cfg.c b/mi/cfg.c
index f5c6961..12ecc75 100644
--- a/mi/cfg.c
+++ b/mi/cfg.c
@@ -29,8 +29,10 @@ static Bb *mkbb(Cfg *cfg)
static void strlabel(Cfg *cfg, char *lbl, Bb *bb)
{
- htput(cfg->lblmap, lbl, bb);
- lappend(&bb->lbls, &bb->nlbls, lbl);
+ if (htget(cfg->lblmap, lbl) != bb) {
+ htput(cfg->lblmap, lbl, bb);
+ lappend(&bb->lbls, &bb->nlbls, lbl);
+ }
}
static void label(Cfg *cfg, Node *lbl, Bb *bb)