Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
get rid of the last swag in SimDag (\o/), hence the encapsulation of
[simgrid.git] / examples / simdag / sd_typed_tasks_test.c
index c64bacb..32f3e59 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010, 2012-2014. The SimGrid Team.
+/* Copyright (c) 2006-2010, 2012-2015. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -6,7 +6,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/ex.h"
 #include "xbt/log.h"
 
@@ -90,9 +90,11 @@ int main(int argc, char **argv)
     XBT_INFO("Task '%s' start time: %f, finish time: %f",
           SD_task_get_name(task),
           SD_task_get_start_time(task), SD_task_get_finish_time(task));
+  }
+
+  xbt_dynar_foreach(changed_tasks, ctr, task) {
     SD_task_destroy(task);
   }
-  xbt_dynar_free_container(&changed_tasks);
   SD_exit();
   return 0;
 }