From: Frederic Suter Date: Tue, 19 Jan 2016 14:00:21 +0000 (+0100) Subject: set latency to 0 before calling getRouteAndLatency X-Git-Tag: v3_13~1202^2~2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/61fff80a05b31c1c17edec06223064d2715c80f7?ds=sidebyside set latency to 0 before calling getRouteAndLatency --- diff --git a/src/simdag/sd_workstation.cpp b/src/simdag/sd_workstation.cpp index f959d3e5ed..67522e2b82 100644 --- a/src/simdag/sd_workstation.cpp +++ b/src/simdag/sd_workstation.cpp @@ -306,7 +306,7 @@ double SD_workstation_get_computation_time(SD_workstation_t workstation, double SD_route_get_latency(SD_workstation_t src, SD_workstation_t dst) { xbt_dynar_t route = NULL; - double latency; + double latency = 0; routing_platf->getRouteAndLatency(src->pimpl_netcard, dst->pimpl_netcard, &route, &latency); @@ -369,7 +369,7 @@ double SD_route_get_communication_time(SD_workstation_t src, xbt_dynar_t route = NULL; int nb_links; double bandwidth, min_bandwidth; - double latency; + double latency = 0; int i; xbt_assert(bytes_amount >= 0, "bytes_amount must be greater than or equal to zero");