/* (2) find the path to the root routing component */
for (current = src_as ; current != NULL ; current = current->routing_father) {
- path_src[index_src++] = current;
if (index_src >= ELEMENTS_FATHER_MAXDEPTH)
xbt_die("ELEMENTS_FATHER_MAXDEPTH should be increased for path_src");
+ path_src[index_src++] = current;
}
for (current = dst_as ; current != NULL ; current = current->routing_father) {
- path_dst[index_dst++] = current;
if (index_dst >= ELEMENTS_FATHER_MAXDEPTH)
xbt_die("ELEMENTS_FATHER_MAXDEPTH should be increased for path_dst");
+ path_dst[index_dst++] = current;
}
/* (3) find the common father */
current_src = xbt_dynar_get_ptr(path_src, index_src);
current_dst = xbt_dynar_get_ptr(path_dst, index_dst);
while (index_src >= 0 && index_dst >= 0 && *current_src == *current_dst) {
- routing_component_t *tmp_src, *tmp_dst;
- tmp_src = xbt_dynar_pop_ptr(path_src);
- tmp_dst = xbt_dynar_pop_ptr(path_dst);
+ xbt_dynar_pop_ptr(path_src);
+ xbt_dynar_pop_ptr(path_dst);
index_src--;
index_dst--;
current_src = xbt_dynar_get_ptr(path_src, index_src);