From: Martin Quinson Date: Thu, 10 Nov 2011 10:21:29 +0000 (+0100) Subject: hide an ugly function used only locally X-Git-Tag: exp_20120216~365 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6d6e609b9bef556e8e41a5a7a8b4860b74d47b71 hide an ugly function used only locally and also mark at its second location that its usage shouldn't be dupplicated. --- diff --git a/src/surf/surf_routing.c b/src/surf/surf_routing.c index de758a14e7..adf4a2b15c 100644 --- a/src/surf/surf_routing.c +++ b/src/surf/surf_routing.c @@ -902,16 +902,6 @@ void generic_set_autonomous_system(routing_component_t rc, const char *name) xbt_dict_set(_to_index, name, id, xbt_free); } -int surf_pointer_resource_cmp(const void *a, const void *b) -{ - return a != b; -} - -int surf_link_resource_cmp(const void *a, const void *b) -{ - return ! !memcmp(a, b, global_routing->size_of_link); -} - void generic_set_bypassroute(routing_component_t rc, const char *src, const char *dst, route_extended_t e_route) diff --git a/src/surf/surf_routing_floyd.c b/src/surf/surf_routing_floyd.c index 4b423e74a6..4bd883a736 100644 --- a/src/surf/surf_routing_floyd.c +++ b/src/surf/surf_routing_floyd.c @@ -261,6 +261,12 @@ void model_floyd_end(void) } } +static int surf_pointer_resource_cmp(const void *a, const void *b) { + return a != b; +} + +//FIXME: kill dupplicates in next function with full routing + void model_floyd_set_route(routing_component_t rc, const char *src, const char *dst, name_route_extended_t route) { diff --git a/src/surf/surf_routing_full.c b/src/surf/surf_routing_full.c index 2e81d2385a..58fc09a37c 100644 --- a/src/surf/surf_routing_full.c +++ b/src/surf/surf_routing_full.c @@ -180,6 +180,10 @@ void model_full_end(void) } } +static int surf_pointer_resource_cmp(const void *a, const void *b) { + return a != b; +} + void model_full_set_route(routing_component_t rc, const char *src, const char *dst, name_route_extended_t route) { diff --git a/src/surf/surf_routing_private.h b/src/surf/surf_routing_private.h index 27d520416d..d017ca18f5 100644 --- a/src/surf/surf_routing_private.h +++ b/src/surf/surf_routing_private.h @@ -30,9 +30,6 @@ void generic_set_bypassroute(routing_component_t rc, const char *src, const char *dst, route_extended_t e_route); -int surf_link_resource_cmp(const void *a, const void *b); -int surf_pointer_resource_cmp(const void *a, const void *b); - /* ************************************************************************** */ /* *************** GENERIC BUSINESS METHODS (declarations) ****************** */