- index_src = xbt_dynar_length(path_src) - 1;
- index_dst = xbt_dynar_length(path_dst) - 1;
- current_src = xbt_dynar_get_as(path_src, index_src, routing_component_t);
- current_dst = xbt_dynar_get_as(path_dst, index_dst, routing_component_t);
- while (index_src > 0 && index_dst > 0 && current_src == current_dst) {
- index_src--;
- index_dst--;
- current_src = xbt_dynar_get_as(path_src, index_src, routing_component_t);
- current_dst = xbt_dynar_get_as(path_dst, index_dst, routing_component_t);
- }
+ do {
+ current_src = path_src[--index_src];
+ current_dst = path_dst[--index_dst];
+ } while (index_src > 0 && index_dst > 0 && current_src == current_dst);