Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Bug fix.
[simgrid.git] / src / xbt / graph.c
index 025c5a5..a0f5d9e 100644 (file)
@@ -20,7 +20,7 @@
 
 
 
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(graph, xbt, "Graph");
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_graph, xbt, "Graph");
 
 
 
@@ -173,12 +173,12 @@ void xbt_graph_free_node(xbt_graph_t g, xbt_node_t n,
   nbr = xbt_dynar_length(g->edges);
   cursor = 0;
   for (i = 0; i < nbr; i++) {
-    xbt_dynar_cursor_get(g->edges, &cursor, &edge);
+    xbt_dynar_get_cpy(g->edges, cursor, &edge);
 
     if ((edge->dst == n) || (edge->src == n)) {
       xbt_graph_free_edge(g, edge, edge_free_function);
     } else
-      xbt_dynar_cursor_step(g->edges, &cursor);
+      cursor ++;
   }
 
   if ((node_free_function) && (n->data))