Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use a cleaner function type for get_link_latency functions.
[simgrid.git] / src / surf / surf_routing.c
index f607a18..eab5f6d 100644 (file)
@@ -25,7 +25,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route, surf, "Routing part of surf");
 routing_global_t global_routing = NULL;
 routing_component_t current_routing = NULL;
 model_type_t current_routing_model = NULL;
-static double_f_pvoid_t get_link_latency = NULL;
+static double_f_cpvoid_t get_link_latency = NULL;
 
 /* Prototypes of each model */
 static void *model_full_create(void);   /* create structures for full routing model */
@@ -719,16 +719,13 @@ static route_extended_t _get_route(const char *src, const char *dst)
 static double _get_latency(const char *src, const char *dst)
 {
 
-  void *link;
-  unsigned int cpt = 0;
   double latency, latency_src, latency_dst = 0.0;
 
   DEBUG2("Solve route  \"%s\" to \"%s\"", src, dst);
 
   xbt_assert0(src && dst, "bad parameters for \"_get_route\" method");
 
-  route_extended_t e_route, e_route_cnt, e_route_src = NULL, e_route_dst =
-      NULL;
+  route_extended_t e_route, e_route_cnt;
 
   xbt_dynar_t elem_father_list = elements_father(src, dst);
 
@@ -1001,7 +998,7 @@ static e_surf_network_element_type_t get_network_element_type(const char
  * 
  * Make a global routing structure and set all the parsing functions.
  */
-void routing_model_create(size_t size_of_links, void *loopback, double_f_pvoid_t get_link_latency_fun  )
+void routing_model_create(size_t size_of_links, void *loopback, double_f_cpvoid_t get_link_latency_fun)
 {
 
   /* config the uniq global routing */