From: Navarrop Date: Fri, 4 Nov 2011 12:47:44 +0000 (+0100) Subject: Without ! is better sorry... X-Git-Tag: exp_20120216~493 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1febc7263364fccc1cfaab87a7b6008d88c68008?hp=21b97caf3d5c7cefcf6ec9bcfbb8e866d1b8f465 Without ! is better sorry... --- diff --git a/src/surf/surf_routing.c b/src/surf/surf_routing.c index 8ff144c2ba..f6a55decbc 100644 --- a/src/surf/surf_routing.c +++ b/src/surf/surf_routing.c @@ -1509,11 +1509,12 @@ void routing_parse_Scluster(void) static int AX_ptr = 0; char *host_id, *groups, *link_id = NULL; - if( !strcmp(struct_cluster->V_cluster_availability_file,"") - || !strcmp(struct_cluster->V_cluster_state_file,"") ){ + if( strcmp(struct_cluster->V_cluster_availability_file,"") + || strcmp(struct_cluster->V_cluster_state_file,"") ) + { if(xbt_dict_size(patterns)==0) patterns = xbt_dict_new(); - + XBT_INFO("'%s' '%s'",A_surfxml_cluster_state_file,struct_cluster->V_cluster_availability_file); xbt_dict_set(patterns,"id",struct_cluster->V_cluster_id,NULL); xbt_dict_set(patterns,"prefix",struct_cluster->V_cluster_prefix,NULL); xbt_dict_set(patterns,"suffix",struct_cluster->V_cluster_suffix,NULL); @@ -1553,7 +1554,7 @@ void routing_parse_Scluster(void) XBT_DEBUG("", host_id, struct_cluster->S_cluster_power); struct_host = xbt_new0(s_hostSG_t, 1); struct_host->V_host_id = host_id; - if(!strcmp(struct_cluster->V_cluster_availability_file,"")){ + if(strcmp(struct_cluster->V_cluster_availability_file,"")){ xbt_dict_set(patterns, "radical", bprintf("%d", start), xbt_free); char* tmp_availability_file = xbt_strdup(struct_cluster->V_cluster_availability_file); xbt_str_varsubst(tmp_availability_file,patterns); @@ -1565,7 +1566,7 @@ void routing_parse_Scluster(void) { XBT_DEBUG("\tavailability_file=\"\""); } - if(!strcmp(struct_cluster->V_cluster_state_file,"")){ + if(strcmp(struct_cluster->V_cluster_state_file,"")){ char *tmp_state_file = xbt_strdup(struct_cluster->V_cluster_state_file); xbt_str_varsubst(tmp_state_file,patterns); XBT_DEBUG("\tstate_file=\"%s\"",tmp_state_file); @@ -1635,7 +1636,7 @@ void routing_parse_Scluster(void) XBT_DEBUG("", host_id, struct_cluster->S_cluster_power); struct_host = xbt_new0(s_hostSG_t, 1); struct_host->V_host_id = host_id; - if(!strcmp(struct_cluster->V_cluster_availability_file,"")){ + if(strcmp(struct_cluster->V_cluster_availability_file,"")){ xbt_dict_set(patterns, "radical", bprintf("%d", i), xbt_free); char* tmp_availability_file = xbt_strdup(struct_cluster->V_cluster_availability_file); xbt_str_varsubst(tmp_availability_file,patterns); @@ -1647,7 +1648,7 @@ void routing_parse_Scluster(void) { XBT_DEBUG("\tavailability_file=\"\""); } - if(!strcmp(struct_cluster->V_cluster_state_file,"")){ + if(strcmp(struct_cluster->V_cluster_state_file,"")){ char *tmp_state_file = xbt_strdup(struct_cluster->V_cluster_state_file); xbt_str_varsubst(tmp_state_file,patterns); XBT_DEBUG("\tstate_file=\"%s\"",tmp_state_file); @@ -1769,8 +1770,8 @@ void routing_parse_Scluster(void) xbt_dynar_free(&radical_elements); xbt_free(new_suffix); - if( !strcmp(struct_cluster->V_cluster_availability_file,"") - || !strcmp(struct_cluster->V_cluster_state_file,"") ) + if( strcmp(struct_cluster->V_cluster_availability_file,"") + || strcmp(struct_cluster->V_cluster_state_file,"") ) xbt_dict_free(&patterns); XBT_DEBUG("");