Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Check if the pointer is writable.
authorpini <pini@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 7 Jan 2011 16:54:16 +0000 (16:54 +0000)
committerpini <pini@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 7 Jan 2011 16:54:16 +0000 (16:54 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9382 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/smpi/smpi_pmpi.c

index b8d53b5..d229642 100644 (file)
@@ -622,6 +622,8 @@ int PMPI_Comm_rank(MPI_Comm comm, int *rank)
   smpi_bench_end();
   if (comm == MPI_COMM_NULL) {
     retval = MPI_ERR_COMM;
   smpi_bench_end();
   if (comm == MPI_COMM_NULL) {
     retval = MPI_ERR_COMM;
+  } else if (rank == NULL) {
+    retval = MPI_ERR_ARG;
   } else {
     *rank = smpi_comm_rank(comm);
     retval = MPI_SUCCESS;
   } else {
     *rank = smpi_comm_rank(comm);
     retval = MPI_SUCCESS;