From 6b8bbced99feea109125e4a8f27b872501bf86c9 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Tue, 5 Jan 2016 01:07:12 +0100 Subject: [PATCH] cleanup: don't initialize variables to dummy values right before giving them the real value --- src/simdag/sd_task.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/simdag/sd_task.cpp b/src/simdag/sd_task.cpp index eabb10ea45..ea1e37ea53 100644 --- a/src/simdag/sd_task.cpp +++ b/src/simdag/sd_task.cpp @@ -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); -- 2.20.1