From: Matthew Fernandez Date: Fri, 23 Dec 2022 03:00:30 +0000 (-0800) Subject: common undoClusterEdges: remove shadowing of 'elist' global X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b5238c79efb8ccb0427e6604247753453ec723c3;p=graphviz common undoClusterEdges: remove shadowing of 'elist' global --- 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);