Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
surf_routing: free coordinates elements.
authoragiersch <agiersch@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 22 Feb 2011 13:51:45 +0000 (13:51 +0000)
committeragiersch <agiersch@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 22 Feb 2011 13:51:45 +0000 (13:51 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9696 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/surf/surf_routing.c

index db11b96..f921c14 100644 (file)
@@ -234,9 +234,9 @@ static void parse_S_host(const char *host_id, const char* coord)
                (void *) info, xbt_free);
 
   if (strcmp(coord,"")) {
-       xbt_dynar_t ctn = xbt_str_split_str(coord, " ");
-       xbt_dynar_shrink(ctn,0);
-       xbt_dict_set (coordinates,host_id,ctn,NULL);
+    xbt_dynar_t ctn = xbt_str_split_str(coord, " ");
+    xbt_dynar_shrink(ctn, 0);
+    xbt_dict_set(coordinates, host_id, ctn, xbt_dynar_free_voidp);
   }
 }
 
@@ -297,9 +297,9 @@ static void parse_S_router(void)
   xbt_dict_set(global_routing->where_network_elements, A_surfxml_router_id,
                (void *) info, xbt_free);
   if (strcmp(A_surfxml_router_coordinates,"")) {
-       xbt_dynar_t ctn = xbt_str_split_str(A_surfxml_router_coordinates, " ");
-       xbt_dynar_shrink(ctn,0);
-       xbt_dict_set (coordinates,A_surfxml_router_id,ctn,NULL);
+    xbt_dynar_t ctn = xbt_str_split_str(A_surfxml_router_coordinates, " ");
+    xbt_dynar_shrink(ctn, 0);
+    xbt_dict_set(coordinates, A_surfxml_router_id, ctn, xbt_dynar_free_voidp);
   }
 }
 
@@ -549,10 +549,10 @@ static void parse_S_AS_XML(void)
   parse_S_AS(A_surfxml_AS_id, A_surfxml_AS_routing);
 
   if (strcmp(A_surfxml_AS_coordinates,"")) {
-       XBT_DEBUG("%s coordinates : %s",A_surfxml_AS_id,A_surfxml_AS_coordinates);
-       xbt_dynar_t ctn = xbt_str_split_str(A_surfxml_AS_coordinates, " ");
-       xbt_dynar_shrink(ctn,0);
-       xbt_dict_set (coordinates,A_surfxml_AS_id,ctn,NULL);
+    XBT_DEBUG("%s coordinates : %s", A_surfxml_AS_id, A_surfxml_AS_coordinates);
+    xbt_dynar_t ctn = xbt_str_split_str(A_surfxml_AS_coordinates, " ");
+    xbt_dynar_shrink(ctn, 0);
+    xbt_dict_set(coordinates, A_surfxml_AS_id, ctn, xbt_dynar_free_voidp);
   }
 }