Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move tests at proper place.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 17 May 2011 20:44:44 +0000 (22:44 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 17 May 2011 20:51:53 +0000 (22:51 +0200)
src/surf/surf_routing.c

index 60b1291..702ef14 100644 (file)
@@ -610,14 +610,14 @@ static void elements_father(const char *src, const char *dst,
 
   /* (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 */