]> granicus.if.org Git - graphviz/commitdiff
cgraph fixes
authorellson <devnull@localhost>
Thu, 23 Oct 2008 16:24:20 +0000 (16:24 +0000)
committerellson <devnull@localhost>
Thu, 23 Oct 2008 16:24:20 +0000 (16:24 +0000)
lib/fdpgen/comp.c

index b100bc667256b1791272de32144c42c8fd5a073a..7eacd89db5f50f499e3a6d4009825d4dd5acc007 100644 (file)
@@ -74,9 +74,11 @@ graph_t **findCComp(graph_t * g, int *cnt, int *pinned)
     bport_t *pp;
     graph_t **comps;
     graph_t **cp;
+#ifndef WITH_CGRAPH
     graph_t *mg;
-    edge_t *me;
     node_t *mn;
+#endif
+    edge_t *me;
     int pinflag = 0;
 
 /* fprintf (stderr, "comps of %s starting at %d \n", g->name, c_cnt); */
@@ -155,8 +157,8 @@ graph_t **findCComp(graph_t * g, int *cnt, int *pinned)
        mn = me->head;
        *cp++ = agusergraph(mn);
 #else /* WITH_CGRAPH */
-    for (me = agfstsubg(g); me; me = agnxtsubg(me)) {
-       *cp++ = me;
+    for (subg = agfstsubg(g); subg; subg = agnxtsubg(subg)) {
+       *cp++ = subg;
 #endif /* WITH_CGRAPH */
        c_cnt--;
     }