Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[codacy/cppcheck] Fix: Variable is reassigned a value before the old one has been...
[simgrid.git] / src / smpi / colls / smpi_default_selector.cpp
index aa44938..7b6899e 100644 (file)
@@ -74,9 +74,8 @@ int Coll_reduce_scatter_default::reduce_scatter(void *sendbuf, void *recvbuf, in
     count += recvcounts[i];
   }
   void *tmpbuf = static_cast<void*>(smpi_get_tmp_sendbuffer(count*datatype->get_extent()));
-  int ret = MPI_SUCCESS;
 
-  ret = Coll_reduce_default::reduce(sendbuf, tmpbuf, count, datatype, op, 0, comm);
+  int ret = Coll_reduce_default::reduce(sendbuf, tmpbuf, count, datatype, op, 0, comm);
   if(ret==MPI_SUCCESS)
     ret = Colls::scatterv(tmpbuf, recvcounts, displs, datatype, recvbuf, recvcounts[rank], datatype, 0, comm);
   xbt_free(displs);