1
1
Fix CID 1315271: Constant expression result

The intent of this conditional is to not produce a peruse event for
probe or mprobe requests. Coverity is correct that the expression is
always true. Changed the || to && to fix. Also moved the conditional
within an OMPI_WANT_PERUSE to ensure the conditional is not evaluated
if peruse is disabled.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
Этот коммит содержится в:
Nathan Hjelm 2015-09-28 15:35:25 -06:00
родитель 73449e969e
Коммит 6611c000c9

Просмотреть файл

@ -1059,16 +1059,16 @@ static inline void append_recv_req_to_queue(opal_list_t *queue,
opal_list_append(queue, (opal_list_item_t*)req);
#if OMPI_WANT_PERUSE
/**
* We don't want to generate this kind of event for MPI_Probe. Hopefully,
* the compiler will optimize out the empty if loop in the case where PERUSE
* support is not required by the user.
* We don't want to generate this kind of event for MPI_Probe.
*/
if(req->req_recv.req_base.req_type != MCA_PML_REQUEST_PROBE ||
req->req_recv.req_base.req_type != MCA_PML_REQUEST_MPROBE) {
if (req->req_recv.req_base.req_type != MCA_PML_REQUEST_PROBE &&
req->req_recv.req_base.req_type != MCA_PML_REQUEST_MPROBE) {
PERUSE_TRACE_COMM_EVENT(PERUSE_COMM_REQ_INSERT_IN_POSTED_Q,
&(req->req_recv.req_base), PERUSE_RECV);
}
#endif
}
/*