X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/709c31c0f7ab71a0669732a0e3a2349bf8c9a746..b3a6228d1e65a6f7eea5b97ae0fa2668af06d59d:/testsuite/xbt/graphxml_usage.c diff --git a/testsuite/xbt/graphxml_usage.c b/testsuite/xbt/graphxml_usage.c index 3930ca7050..f0e63f92cc 100644 --- a/testsuite/xbt/graphxml_usage.c +++ b/testsuite/xbt/graphxml_usage.c @@ -76,7 +76,7 @@ void test(char *graph_file) INFO0("---- Dumping Edge lengths ----"); adj = xbt_graph_get_length_matrix(graph); - buf = calloc(n * 20, sizeof(char)); + buf = xbt_new0(char,n * 20); for (i = 0; i < n; i++) { for (j = 0; j < n; j++) { sprintf(buf + strlen(buf), "%le\t", adj[i * n + j]); @@ -94,7 +94,7 @@ void test(char *graph_file) INFO0("---- Testing Shortest Paths ----"); route = xbt_graph_shortest_paths(graph); - buf = calloc(n * 40, sizeof(char)); + buf = xbt_new0(char,n * 40); for (i = 0; i < n; i++) { for (j = 0; j < n; j++) { if (route[i * n + j])