Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Sonar: remove redundant jumps.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 28 Oct 2017 15:49:33 +0000 (17:49 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 28 Oct 2017 15:49:33 +0000 (17:49 +0200)
src/mc/mc_checkpoint.cpp
src/mc/mc_dwarf.cpp
src/mc/remote/Channel.cpp
src/mc/remote/RemoteClient.cpp

index aa9f21d..6538130 100644 (file)
@@ -143,7 +143,6 @@ void add_region(int index, simgrid::mc::Snapshot* snapshot,
   snapshot->snapshot_regions[index]
     = std::unique_ptr<simgrid::mc::RegionSnapshot>(
       new simgrid::mc::RegionSnapshot(std::move(region)));
-  return;
 }
 
 static void get_memory_regions(simgrid::mc::RemoteClient* process, simgrid::mc::Snapshot* snapshot)
index 5e95580..e7ae570 100644 (file)
@@ -831,7 +831,7 @@ static void MC_dwarf_handle_variable_die(simgrid::mc::ObjectInformation* info, D
   if (not variable)
     return;
   // Those arrays are sorted later:
-  else if (variable->global)
+  if (variable->global)
     info->global_variables.push_back(std::move(*variable));
   else if (frame != nullptr)
     frame->variables.push_back(std::move(*variable));
index 1fee675..b655b61 100644 (file)
@@ -29,11 +29,10 @@ Channel::~Channel()
 int Channel::send(const void* message, size_t size) const
 {
   XBT_DEBUG("Send %s", MC_message_type_name(*(e_mc_message_type*)message));
-  while (::send(this->socket_, message, size, 0) == -1)
-    if (errno == EINTR)
-      continue;
-    else
+  while (::send(this->socket_, message, size, 0) == -1) {
+    if (errno != EINTR)
       return errno;
+  }
   return 0;
 }
 
index 4f87d9a..c637009 100644 (file)
@@ -649,7 +649,6 @@ void RemoteClient::dumpStack()
 
   _UPT_destroy(context);
   unw_destroy_addr_space(as);
-  return;
 }
 
 bool RemoteClient::actor_is_enabled(aid_t pid)