Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
when the standard said "return" here, it was not meant as return value.
authorAugustin Degomme <adegomme@gmail.com>
Fri, 2 Apr 2021 15:27:45 +0000 (17:27 +0200)
committerAugustin Degomme <adegomme@gmail.com>
Fri, 2 Apr 2021 18:03:31 +0000 (20:03 +0200)
src/smpi/bindings/smpi_pmpi.cpp

index 73a9d6b..4b2a1a9 100644 (file)
@@ -182,13 +182,12 @@ int PMPI_Get_count(const MPI_Status * status, MPI_Datatype datatype, int *count)
     size_t size = datatype->size();
     if (size == 0) {
       *count = 0;
-      return MPI_SUCCESS;
     } else if (status->count % size != 0) {
-      return MPI_UNDEFINED;
+      *count = MPI_UNDEFINED;
     } else {
       *count = simgrid::smpi::Status::get_count(status, datatype);
-      return MPI_SUCCESS;
     }
+    return MPI_SUCCESS;
   }
 }