Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cleanup: don't initialize variables to dummy values right before giving them the...
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 5 Jan 2016 00:07:12 +0000 (01:07 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 5 Jan 2016 00:07:12 +0000 (01:07 +0100)
src/simdag/sd_task.cpp

index eabb10e..ea1e37e 100644 (file)
@@ -988,9 +988,6 @@ void SD_task_schedule(SD_task_t task, int workstation_count,
                       const double *flops_amount,
                       const double *bytes_amount, double rate)
 {
-  int communication_nb;
-  task->workstation_nb = 0;
-  task->rate = -1;
   xbt_assert(workstation_count > 0, "workstation_nb must be positive");
 
   task->workstation_nb = workstation_count;
@@ -1006,7 +1003,7 @@ void SD_task_schedule(SD_task_t task, int workstation_count,
     task->flops_amount = NULL;
   }
 
-  communication_nb = workstation_count * workstation_count;
+  int communication_nb = workstation_count * workstation_count;
   if (bytes_amount) {
     task->bytes_amount = (double*)xbt_realloc(task->bytes_amount,
                                              sizeof(double) * communication_nb);