routing_global_t global_routing = NULL;
routing_component_t current_routing = NULL;
model_type_t current_routing_model = NULL;
routing_global_t global_routing = NULL;
routing_component_t current_routing = NULL;
model_type_t current_routing_model = NULL;
/* Prototypes of each model */
static void *model_full_create(void); /* create structures for full routing model */
/* Prototypes of each model */
static void *model_full_create(void); /* create structures for full routing model */
current_src = xbt_dynar_get_ptr(path_src, index_src);
current_dst = xbt_dynar_get_ptr(path_dst, index_dst);
while (index_src >= 0 && index_dst >= 0 && *current_src == *current_dst) {
current_src = xbt_dynar_get_ptr(path_src, index_src);
current_dst = xbt_dynar_get_ptr(path_dst, index_dst);
while (index_src >= 0 && index_dst >= 0 && *current_src == *current_dst) {
-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)
xbt_dynar_free(&(*elem)->re_str_link);
pcre_free((*elem)->re_src);
pcre_free((*elem)->re_dst);
xbt_dynar_free(&(*elem)->re_str_link);
pcre_free((*elem)->re_src);
pcre_free((*elem)->re_dst);
pcre_free((*elem)->generic_rule_route.re_dst);
xbt_free((*elem)->re_src_gateway);
xbt_free((*elem)->re_dst_gateway);
pcre_free((*elem)->generic_rule_route.re_dst);
xbt_free((*elem)->re_src_gateway);
xbt_free((*elem)->re_dst_gateway);
xbt_dict_set(_to_index, name, id, xbt_free);
}
xbt_dict_set(_to_index, name, id, xbt_free);
}
-static int surf_link_resource_cmp(const void *a, const void *b) {
- if( memcmp(a,b,global_routing->size_of_link) == 0 );
- return 0;
- return 1;
+static int surf_link_resource_cmp(const void *a, const void *b)
+{
+ return !!memcmp(a,b,global_routing->size_of_link);
current_src = xbt_dynar_get_ptr(path_src, index_src);
current_dst = xbt_dynar_get_ptr(path_dst, index_dst);
while (index_src >= 0 && index_dst >= 0 && *current_src == *current_dst) {
current_src = xbt_dynar_get_ptr(path_src, index_src);
current_dst = xbt_dynar_get_ptr(path_dst, index_dst);
while (index_src >= 0 && index_dst >= 0 && *current_src == *current_dst) {