Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics: s/free/xbt_free.
[simgrid.git] / src / surf / sg_platf.cpp
index ad5d651..b22b8b8 100644 (file)
@@ -195,7 +195,6 @@ void sg_platf_new_cluster(ClusterCreationArgs* cluster)
     XBT_DEBUG("<host\tid=\"%s\"\tpower=\"%f\">", host_id.c_str(), cluster->speeds.front());
 
     s_sg_platf_host_cbarg_t host;
-    memset(&host, 0, sizeof(host));
     host.id = host_id.c_str();
     if ((cluster->properties != nullptr) && (not cluster->properties->empty())) {
       host.properties = new std::map<std::string, std::string>;
@@ -316,7 +315,6 @@ void sg_platf_new_cabinet(CabinetCreationArgs* cabinet)
   for (int const& radical : *cabinet->radicals) {
     std::string hostname = cabinet->prefix + std::to_string(radical) + cabinet->suffix;
     s_sg_platf_host_cbarg_t host;
-    memset(&host, 0, sizeof(host));
     host.pstate           = 0;
     host.core_amount      = 1;
     host.id               = hostname.c_str();
@@ -530,7 +528,7 @@ static void surf_config_models_setup()
   if ((not xbt_cfg_is_default_value("network/model") || not xbt_cfg_is_default_value("cpu/model")) &&
       xbt_cfg_is_default_value("host/model")) {
     host_model_name = "compound";
-    xbt_cfg_set_string("host/model", host_model_name);
+    xbt_cfg_set_string("host/model", host_model_name.c_str());
   }
 
   XBT_DEBUG("host model: %s", host_model_name.c_str());