From: navarro Date: Wed, 7 Mar 2012 14:45:11 +0000 (+0100) Subject: optim: don't call for xbt_dynar_foreach X-Git-Tag: v3_7~315^2~7 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6b28627e82e0e6642803ed2375c3ae9a07bff5ff optim: don't call for xbt_dynar_foreach --- diff --git a/src/surf/surf_routing.c b/src/surf/surf_routing.c index 5270da88b0..a0d7d0220e 100644 --- a/src/surf/surf_routing.c +++ b/src/surf/surf_routing.c @@ -571,14 +571,7 @@ static void _get_route_and_latency(const char *src, const char *dst, /* If dest gateway is not our destination, we have to recursively find our way from this point */ // FIXME why can't I factorize it the same way than [src;src_gw] without breaking the examples?? if (strcmp(dst_gateway, dst)) { - xbt_dynar_t route_dst = xbt_dynar_new(global_routing->size_of_link,NULL); - - _get_route_and_latency(dst_gateway, dst, &route_dst, latency); - - xbt_dynar_foreach(route_dst, cpt, link) { - xbt_dynar_push(*links, &link); - } - xbt_dynar_free(&route_dst); + _get_route_and_latency(dst_gateway, dst, links, latency); } xbt_free(src_gateway);