From 6a4cf1fef5668dd6224ba70a0f92a80ba5e7f19c Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Tue, 17 Oct 2006 04:27:00 +0000 Subject: [PATCH] A request is inactive only if it is persistant. Therefore, we don't need 2 sequential ifs, we can reach the same result with 2 embedded ifs. This commit was SVN r12132. --- ompi/request/req_wait.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ompi/request/req_wait.c b/ompi/request/req_wait.c index a3b0978937..800498725e 100644 --- a/ompi/request/req_wait.c +++ b/ompi/request/req_wait.c @@ -20,7 +20,6 @@ #include "ompi/constants.h" #include "ompi/request/request.h" - int ompi_request_wait( ompi_request_t ** req_ptr, ompi_status_public_t * status) @@ -58,10 +57,10 @@ finished: status->_count = req->req_status._count; status->_cancelled = req->req_status._cancelled; } - if( req->req_state == OMPI_REQUEST_INACTIVE ) { - return OMPI_SUCCESS; - } if( req->req_persistent ) { + if( req->req_state == OMPI_REQUEST_INACTIVE ) { + return OMPI_SUCCESS; + } req->req_state = OMPI_REQUEST_INACTIVE; return req->req_status.MPI_ERROR; }