From c8fcae0a04b92a641beb42ffe2172d2a9cc8d2f8 Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Fri, 2 Apr 2021 17:27:45 +0200 Subject: [PATCH] when the standard said "return" here, it was not meant as return value. --- src/smpi/bindings/smpi_pmpi.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/smpi/bindings/smpi_pmpi.cpp b/src/smpi/bindings/smpi_pmpi.cpp index 73a9d6b1ee..4b2a1a9503 100644 --- a/src/smpi/bindings/smpi_pmpi.cpp +++ b/src/smpi/bindings/smpi_pmpi.cpp @@ -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; } } -- 2.20.1