git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8838
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
{
int index, c;
MPI_Status stat;
{
int index, c;
MPI_Status stat;
+ MPI_Status *pstat = status == MPI_STATUS_IGNORE ? MPI_STATUS_IGNORE : &stat;
c = count;
while (c > 0) {
c = count;
while (c > 0) {
- index = smpi_mpi_waitany(count, requests, &stat);
+ index = smpi_mpi_waitany(count, requests, pstat);
if (index == MPI_UNDEFINED) {
break;
}
if (status != MPI_STATUS_IGNORE) {
if (index == MPI_UNDEFINED) {
break;
}
if (status != MPI_STATUS_IGNORE) {
- memcpy(&status[index], &stat, sizeof(stat));
+ memcpy(&status[index], pstat, sizeof *pstat);