Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 23 Sep 2013 11:21:23 +0000 (13:21 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 23 Sep 2013 11:23:55 +0000 (13:23 +0200)
src/simgrid/sg_config.c

index 97f69f2..1a59ae0 100644 (file)
@@ -869,7 +869,7 @@ void sg_config_finalize(void)
 /* Pick the right models for CPU, net and workstation, and call their model_init_preparse */
 void surf_config_models_setup()
 {
-  char *workstation_model_name;
+  const char *workstation_model_name;
   int workstation_id = -1;
   char *network_model_name = NULL;
   char *cpu_model_name = NULL;
@@ -890,10 +890,9 @@ void surf_config_models_setup()
   if ((!xbt_cfg_is_default_value(_sg_cfg_set, "network/model") ||
        !xbt_cfg_is_default_value(_sg_cfg_set, "cpu/model")) &&
       xbt_cfg_is_default_value(_sg_cfg_set, "workstation/model")) {
-    const char *val = "compound";
     XBT_INFO("Switching workstation model to compound since you changed the network and/or cpu model(s)");
-    xbt_cfg_set_string(_sg_cfg_set, "workstation/model", val);
-    workstation_model_name = (char *) "compound";
+    workstation_model_name = "compound";
+    xbt_cfg_set_string(_sg_cfg_set, "workstation/model", workstation_model_name);
   }
 
   XBT_DEBUG("Workstation model: %s", workstation_model_name);