I think the NULL test is a left over from long ago. At one point in the past we decided that all MPI related tests have to be done outside the PML functions (i.e. in the MPI layer). The test for request == NULL is present in the start.c and startall.c. Anywhere else (i.e. where we use internally the pml_start call) we can make sure that this doesn't happens. Therefore, the test can be safely removed from the startall function.

  george.


On Fri, 20 Apr 2007, jjhur...@osl.iu.edu wrote:

Author: jjhursey
Date: 2007-04-20 13:17:11 EDT (Fri, 20 Apr 2007)
New Revision: 14444
URL: https://svn.open-mpi.org/trac/ompi/changeset/14444

Log:
Check for NULL before trying to use the variable.


Text files modified:
  trunk/ompi/mca/pml/ob1/pml_ob1_start.c |     4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

Modified: trunk/ompi/mca/pml/ob1/pml_ob1_start.c
==============================================================================
--- trunk/ompi/mca/pml/ob1/pml_ob1_start.c      (original)
+++ trunk/ompi/mca/pml/ob1/pml_ob1_start.c      2007-04-20 13:17:11 EDT (Fri, 
20 Apr 2007)
@@ -32,11 +32,11 @@

    for(i=0; i<count; i++) {
        mca_pml_base_request_t *pml_request = 
(mca_pml_base_request_t*)requests[i];
+        if(NULL == pml_request)
+            continue;
        if (OMPI_REQUEST_PML != requests[i]->req_type) {
            continue;
        }
-        if(NULL == pml_request)
-            continue;

        /* If the persistent request is currently active - obtain the
         * request lock and verify the status is incomplete. if the
_______________________________________________
svn mailing list
s...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/svn


"We must accept finite disappointment, but we must never lose infinite
hope."
                                  Martin Luther King

Reply via email to