Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
document in ChangeLog+NEWS my work on documentation
[simgrid.git] / testsuite / xbt / graphxml_usage.c
index e3927e28d8e57c70b701745dddcaadad0a9bd29f..e49db05b1bd9cc8ac417c85487cf0c0e400a59f9 100644 (file)
@@ -12,7 +12,7 @@
 #include <stdio.h>
 
 #ifdef _MSC_VER
-#define snprintf       _snprintf
+#define snprintf  _snprintf
 #endif
 
 #include "xbt/module.h"
@@ -129,7 +129,7 @@ void test(char *graph_file)
     XBT_INFO("Before Node deletion: %lu nodes, %lu edges",
           xbt_dynar_length(nodes), xbt_dynar_length(edges));
 
-    while (xbt_dynar_length(nodes))
+    while (!xbt_dynar_is_empty(nodes))
       xbt_graph_free_node(graph,
                           *((xbt_node_t *) xbt_dynar_get_ptr(nodes, 0)),
                           free_label, NULL);
@@ -144,7 +144,7 @@ void test(char *graph_file)
     XBT_INFO("Before Edge deletion: %lu nodes, %lu edges",
           xbt_dynar_length(nodes), xbt_dynar_length(edges));
 
-    while (xbt_dynar_length(edges))
+    while (!xbt_dynar_is_empty(edges))
       xbt_graph_free_edge(graph,
                           *((xbt_edge_t *) xbt_dynar_get_ptr(edges, 0)),
                           NULL);