X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/33231edf2cf2a3615965d676f3d5c7f37a951569..056d48c9fa3d5fa5afd2be695f54edbc5fd5434d:/src/surf/ptask_L07.cpp diff --git a/src/surf/ptask_L07.cpp b/src/surf/ptask_L07.cpp index e691b00a04..00718591d7 100644 --- a/src/surf/ptask_L07.cpp +++ b/src/surf/ptask_L07.cpp @@ -394,14 +394,12 @@ L07Action::~L07Action(){ void L07Action::updateBound() { double lat_current = 0.0; - double lat_bound = -1.0; - int i, j; int hostNb = hostList_->size(); if (communicationAmount_ != nullptr) { - for (i = 0; i < hostNb; i++) { - for (j = 0; j < hostNb; j++) { + for (int i = 0; i < hostNb; i++) { + for (int j = 0; j < hostNb; j++) { if (communicationAmount_[i * hostNb + j] > 0) { double lat = 0.0; @@ -413,7 +411,7 @@ void L07Action::updateBound() } } } - lat_bound = sg_tcp_gamma / (2.0 * lat_current); + double lat_bound = sg_tcp_gamma / (2.0 * lat_current); XBT_DEBUG("action (%p) : lat_bound = %g", this, lat_bound); if ((latency_ == 0.0) && (suspended_ == 0)) { if (rate_ < 0)