A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
see if that pleases scan-build
[simgrid.git]
/
src
/
smpi
/
bindings
/
smpi_pmpi_request.cpp
diff --git
a/src/smpi/bindings/smpi_pmpi_request.cpp
b/src/smpi/bindings/smpi_pmpi_request.cpp
index
926b55c
..
c8ef0ec
100644
(file)
--- a/
src/smpi/bindings/smpi_pmpi_request.cpp
+++ b/
src/smpi/bindings/smpi_pmpi_request.cpp
@@
-645,6
+645,9
@@
int PMPI_Waitany(int count, MPI_Request requests[], int *index, MPI_Status * sta
{
if (index == nullptr)
return MPI_ERR_ARG;
+
+ if (count <= 0)
+ return MPI_SUCCESS;
smpi_bench_end();
//save requests information for tracing
@@
-656,9
+659,9
@@
int PMPI_Waitany(int count, MPI_Request requests[], int *index, MPI_Status * sta
MPI_Comm comm;
} savedvalstype;
savedvalstype* savedvals=nullptr;
- if(count>0){
-
savedvals = xbt_new0(savedvalstype, count);
- }
+
+ savedvals = xbt_new0(savedvalstype, count);
+
for (int i = 0; i < count; i++) {
MPI_Request req = requests[i]; //already received requests are no longer valid
if (req) {