]> granicus.if.org Git - graphviz/commitdiff
common undoClusterEdges: remove shadowing of 'elist' global
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 23 Dec 2022 03:00:30 +0000 (19:00 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 24 Dec 2022 18:48:38 +0000 (10:48 -0800)
lib/common/utils.c

index becac3a78e918cc34b843313fc5963070a39354f..9837b691e15bf714dc224387fe07f10481bdb4f4 100644 (file)
@@ -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);