Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'clean_events' of github.com:Takishipp/simgrid into clean_events
[simgrid.git] / teshsuite / simdag / basic-link-test / basic-link-test.c
index b7a67e0..5cf1254 100644 (file)
@@ -22,18 +22,17 @@ int main(int argc, char **argv)
 
   /* creation of the environment */
   SD_create_environment(argv[1]);
-  const SD_link_t *links = sg_link_list();
+  SD_link_t *links = sg_link_list();
   int count = sg_link_count();
   XBT_INFO("Link count: %d", count);
   qsort((void *)links, count, sizeof(SD_link_t), cmp_link);
-   
+
   for (int i=0; i < count; i++){
     XBT_INFO("%s: latency = %.5f, bandwidth = %f", sg_link_name(links[i]),
              sg_link_latency(links[i]), sg_link_bandwidth(links[i]));
     sg_link_data_set(links[i], (void*) user_data);
     xbt_assert(!strcmp(user_data, (const char*)sg_link_data(links[i])),"User data was corrupted.");
   }
-
-  SD_exit();
+  xbt_free(links);
   return 0;
 }