Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make the initializations follow the order of the declarations.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 21 Jun 2012 14:36:31 +0000 (16:36 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 21 Jun 2012 15:20:53 +0000 (17:20 +0200)
src/msg/msg_task.c

index a833cf5..5e9bedf 100644 (file)
@@ -48,22 +48,24 @@ m_task_t MSG_task_create(const char *name, double compute_duration,
   m_task_t task = xbt_new(s_m_task_t, 1);
   simdata_task_t simdata = xbt_new(s_simdata_task_t, 1);
   task->simdata = simdata;
   m_task_t task = xbt_new(s_m_task_t, 1);
   simdata_task_t simdata = xbt_new(s_simdata_task_t, 1);
   task->simdata = simdata;
+
   /* Task structure */
   task->name = xbt_strdup(name);
   task->data = data;
 
   /* Simulator Data */
   /* Task structure */
   task->name = xbt_strdup(name);
   task->data = data;
 
   /* Simulator Data */
-  simdata->host_nb = 0;
-  simdata->computation_amount = compute_duration;
+  simdata->compute = NULL;
+  simdata->comm = NULL;
   simdata->message_size = message_size;
   simdata->message_size = message_size;
-  simdata->rate = -1.0;
-  simdata->priority = 1.0;
-  simdata->isused = 0;
+  simdata->computation_amount = compute_duration;
   simdata->sender = NULL;
   simdata->receiver = NULL;
   simdata->sender = NULL;
   simdata->receiver = NULL;
-  simdata->compute = NULL;
-  simdata->comm = NULL;
+  simdata->source = NULL;
+  simdata->priority = 1.0;
+  simdata->rate = -1.0;
+  simdata->isused = 0;
 
 
+  simdata->host_nb = 0;
   simdata->host_list = NULL;
   simdata->comp_amount = NULL;
   simdata->comm_amount = NULL;
   simdata->host_list = NULL;
   simdata->comp_amount = NULL;
   simdata->comm_amount = NULL;