X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/43f93f182e1f7e625e4425e3a049958707821918..2c7424783b67745c1a30e3541429eb5ed82e1402:/src/smpi/smpi_pmpi.c diff --git a/src/smpi/smpi_pmpi.c b/src/smpi/smpi_pmpi.c index 1339144ef2..9206f28ef6 100644 --- a/src/smpi/smpi_pmpi.c +++ b/src/smpi/smpi_pmpi.c @@ -1568,7 +1568,8 @@ int PMPI_Wait(MPI_Request * request, MPI_Status * status) int PMPI_Waitany(int count, MPI_Request requests[], int *index, MPI_Status * status) { - int retval = 0; + if (index == NULL) + return MPI_ERR_ARG; smpi_bench_end(); #ifdef HAVE_TRACING @@ -1595,12 +1596,7 @@ int PMPI_Waitany(int count, MPI_Request requests[], int *index, MPI_Status * sta TRACE_smpi_ptp_in(rank_traced, -1, -1, __FUNCTION__,extra); #endif - if (index == NULL) { - retval = MPI_ERR_ARG; - } else { - *index = smpi_mpi_waitany(count, requests, status); - retval = MPI_SUCCESS; - } + *index = smpi_mpi_waitany(count, requests, status); #ifdef HAVE_TRACING if(*index!=MPI_UNDEFINED){ int src_traced = srcs[*index]; @@ -1623,7 +1619,7 @@ int PMPI_Waitany(int count, MPI_Request requests[], int *index, MPI_Status * sta } #endif smpi_bench_begin(); - return retval; + return MPI_SUCCESS; } int PMPI_Waitall(int count, MPI_Request requests[], MPI_Status status[])