From: Arnaud Giersch Date: Thu, 21 Jun 2012 14:36:31 +0000 (+0200) Subject: Make the initializations follow the order of the declarations. X-Git-Tag: v3_8~515 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/c18de7d827becb81d9c622bf0c58626eadf32fed Make the initializations follow the order of the declarations. --- diff --git a/src/msg/msg_task.c b/src/msg/msg_task.c index a833cf50f9..5e9bedf513 100644 --- a/src/msg/msg_task.c +++ b/src/msg/msg_task.c @@ -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; + /* 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->rate = -1.0; - simdata->priority = 1.0; - simdata->isused = 0; + simdata->computation_amount = compute_duration; 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;