X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6ee7e9c2e455536ab817ae0136acfbb53822eecd..05c4a63e27e20b594178b0e46298a04683c64c26:/testsuite/xbt/graphxml_usage.c diff --git a/testsuite/xbt/graphxml_usage.c b/testsuite/xbt/graphxml_usage.c index 437fd33719..e49db05b1b 100644 --- a/testsuite/xbt/graphxml_usage.c +++ b/testsuite/xbt/graphxml_usage.c @@ -12,7 +12,7 @@ #include #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); @@ -154,6 +154,7 @@ void test(char *graph_file) } xbt_graph_free_graph(graph, free_label, NULL, NULL); + } #ifdef __BORLANDC__ @@ -169,6 +170,5 @@ int main(int argc, char **argv) return 1; } test(argv[1]); - return 0; }