From 799438173fcfecfd3aa9455afe021998445970cc Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sun, 8 Apr 2012 15:12:01 -1000 Subject: [PATCH 1/1] avoid void* pointers since we know the pointed type in all usage location of this function --- src/surf/surf_routing_generic.c | 6 ++---- src/surf/surf_routing_private.h | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/surf/surf_routing_generic.c b/src/surf/surf_routing_generic.c index e627a7b2ac..f156fb7ba8 100644 --- a/src/surf/surf_routing_generic.c +++ b/src/surf/surf_routing_generic.c @@ -229,7 +229,7 @@ route_t generic_get_bypassroute(AS_t rc, network_element_t src, network_element_ /* ************************* GENERIC AUX FUNCTIONS ************************** */ route_t -generic_new_route(e_surf_routing_hierarchy_t hierarchy, void *data, int order) +generic_new_route(e_surf_routing_hierarchy_t hierarchy, route_t data, int order) { char *link_name; @@ -244,8 +244,6 @@ generic_new_route(e_surf_routing_hierarchy_t hierarchy, void *data, int order) "the hierarchy type is not SURF_ROUTING_BASE"); links = ((route_t) data)->link_list; - - links_id = new_route->link_list; xbt_dynar_foreach(links, cpt, link_name) { @@ -265,7 +263,7 @@ generic_new_route(e_surf_routing_hierarchy_t hierarchy, void *data, int order) route_t generic_new_extended_route(e_surf_routing_hierarchy_t hierarchy, - void *data, int order) + route_t data, int order) { char *link_name; diff --git a/src/surf/surf_routing_private.h b/src/surf/surf_routing_private.h index f5ebd55a08..ec9fe747a8 100644 --- a/src/surf/surf_routing_private.h +++ b/src/surf/surf_routing_private.h @@ -48,10 +48,10 @@ route_t generic_get_bypassroute(AS_t rc, route_t generic_new_extended_route(e_surf_routing_hierarchy_t hierarchy, - void *data, int order); + route_t data, int order); route_t generic_new_route(e_surf_routing_hierarchy_t hierarchy, - void *data, int order); + route_t data, int order); AS_t generic_autonomous_system_exist(AS_t rc, char *element); AS_t -- 2.20.1