Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill small crufts here and there
[simgrid.git] / src / surf / surf_routing.c
index d176099..07162fa 100644 (file)
@@ -37,7 +37,6 @@ static xbt_dict_t random_value = NULL;
 /* Global vars */
 routing_global_t global_routing = NULL;
 AS_t current_routing = NULL;
-routing_model_description_t current_routing_model = NULL;
 
 /* global parse functions */
 xbt_dynar_t link_list = NULL;   /* temporary store of current list link of a route */
@@ -374,7 +373,7 @@ void routing_AS_end()
                 (void *) info);
 
     if (current_routing->routing->end)
-      (*(current_routing->routing->end)) ();
+      (*(current_routing->routing->end)) (current_routing);
     current_routing = current_routing->routing_father;
   }
 }
@@ -874,8 +873,7 @@ static void routing_parse_cluster(void)
       if (strcmp(struct_cluster->availability_trace, "")) {
         xbt_dict_set(patterns, "radical", bprintf("%d", i), xbt_free);
         char *tmp_availability_file =
-            xbt_strdup(struct_cluster->availability_trace);
-        xbt_str_varsubst(tmp_availability_file, patterns);
+            xbt_str_varsubst(struct_cluster->availability_trace, patterns);
         XBT_DEBUG("\tavailability_file=\"%s\"", tmp_availability_file);
         host.power_trace = tmgr_trace_new(tmp_availability_file);
         xbt_free(tmp_availability_file);
@@ -883,8 +881,8 @@ static void routing_parse_cluster(void)
         XBT_DEBUG("\tavailability_file=\"\"");
       }
       if (strcmp(struct_cluster->state_trace, "")) {
-        char *tmp_state_file = xbt_strdup(struct_cluster->state_trace);
-        xbt_str_varsubst(tmp_state_file, patterns);
+        char *tmp_state_file =
+            xbt_str_varsubst(struct_cluster->state_trace, patterns);
         XBT_DEBUG("\tstate_file=\"%s\"", tmp_state_file);
         host.state_trace = tmgr_trace_new(tmp_state_file);
         xbt_free(tmp_state_file);