From b5238c79efb8ccb0427e6604247753453ec723c3 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Thu, 22 Dec 2022 19:00:30 -0800 Subject: [PATCH] common undoClusterEdges: remove shadowing of 'elist' global --- lib/common/utils.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/common/utils.c b/lib/common/utils.c index becac3a78..9837b691e 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -1205,24 +1205,23 @@ void undoClusterEdges(graph_t * g) node_t *nextn; edge_t *e; graph_t *clg; - edge_t **elist; int ecnt = num_clust_edges(g); int i = 0; if (!ecnt) return; clg = agsubg(g, "__clusternodes",1); agbindrec(clg, "Agraphinfo_t", sizeof(Agraphinfo_t), true); - elist = N_NEW(ecnt, edge_t*); + edge_t **edgelist = N_NEW(ecnt, edge_t*); for (n = agfstnode(g); n; n = agnxtnode(g, n)) { for (e = agfstout(g, n); e; e = agnxtout(g, e)) { if (ED_compound(e)) - elist[i++] = e; + edgelist[i++] = e; } } assert(i == ecnt); for (i = 0; i < ecnt; i++) - undoCompound(elist[i], clg); - free (elist); + undoCompound(edgelist[i], clg); + free (edgelist); for (n = agfstnode(clg); n; n = nextn) { nextn = agnxtnode(clg, n); gv_cleanup_node(n); -- 2.40.0