Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/simgrid/simgrid
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 21 Feb 2019 19:32:54 +0000 (20:32 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 21 Feb 2019 19:32:54 +0000 (20:32 +0100)
src/msg/msg_gos.cpp
src/surf/xml/surfxml_sax_cb.cpp

index 81b3e33..7a80ef3 100644 (file)
@@ -275,8 +275,8 @@ msg_error_t MSG_task_receive_ext_bounded(msg_task_t * task, const char *alias, d
 }
 
 /* Internal function used to factorize code between MSG_task_isend(), MSG_task_isend_bounded(), and MSG_task_dsend(). */
-static inline msg_comm_t MSG_task_isend_internal(msg_task_t task, const char* alias,
-                                                 void_f_pvoid_t cleanup, int detached)
+static inline msg_comm_t MSG_task_isend_internal(msg_task_t task, const char* alias, void_f_pvoid_t cleanup,
+                                                 bool detached)
 {
   simdata_task_t t_simdata = nullptr;
   msg_process_t myself = MSG_process_self();
@@ -322,7 +322,7 @@ static inline msg_comm_t MSG_task_isend_internal(msg_task_t task, const char* al
  */
 msg_comm_t MSG_task_isend(msg_task_t task, const char *alias)
 {
-  return MSG_task_isend_internal(task, alias, nullptr, 0);
+  return MSG_task_isend_internal(task, alias, nullptr, false);
 }
 
 /**
@@ -339,7 +339,7 @@ msg_comm_t MSG_task_isend(msg_task_t task, const char *alias)
 msg_comm_t MSG_task_isend_bounded(msg_task_t task, const char *alias, double maxrate)
 {
   task->simdata->rate = maxrate;
-  return MSG_task_isend_internal(task, alias, nullptr, 0);
+  return MSG_task_isend_internal(task, alias, nullptr, false);
 }
 
 /**
@@ -359,7 +359,7 @@ msg_comm_t MSG_task_isend_bounded(msg_task_t task, const char *alias, double max
  */
 void MSG_task_dsend(msg_task_t task, const char *alias, void_f_pvoid_t cleanup)
 {
-  msg_comm_t XBT_ATTRIB_UNUSED comm = MSG_task_isend_internal(task, alias, cleanup, 1);
+  msg_comm_t XBT_ATTRIB_UNUSED comm = MSG_task_isend_internal(task, alias, cleanup, true);
   xbt_assert(comm == nullptr);
 }
 
index 7d7bf77..333c2e7 100644 (file)
@@ -991,11 +991,12 @@ void surf_parse_open(const std::string& file)
   surf_parsed_filename = file;
   std::string dir      = simgrid::xbt::Path(file).get_dir_name();
   surf_path.push_back(dir);
-  std::string cwd = simgrid::xbt::Path().get_dir_name();
 
   surf_file_to_parse = surf_fopen(file, "r");
-  if (surf_file_to_parse == nullptr)
+  if (surf_file_to_parse == nullptr) {
+    std::string cwd = simgrid::xbt::Path().get_name();
     xbt_die("Unable to open '%s' from '%s'\n", file.c_str(), cwd.c_str());
+  }
   surf_input_buffer = surf_parse__create_buffer(surf_file_to_parse, YY_BUF_SIZE);
   surf_parse__switch_to_buffer(surf_input_buffer);
   surf_parse_lineno = 1;