Skip to content

Commit

Permalink
osc/rdma: Fix double assignment typo
Browse files Browse the repository at this point in the history
Fix an assignment of request onto itself, which was a harmless typo,
but was responsible for Coverity issues CID 1429865 and CID 1429864.

Signed-off-by: Brian Barrett <bbarrett@amazon.com>
  • Loading branch information
bwbarrett committed Feb 9, 2022
1 parent 4281d4a commit 030e0b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ompi/mca/osc/rdma/osc_rdma_comm.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ static void ompi_osc_rdma_put_complete (struct mca_btl_base_module_t *btl, struc

/* the lowest bit is used as a flag indicating this put operation has a request */
if ((intptr_t) context & 0x1) {
ompi_osc_rdma_request_t *request = request = (ompi_osc_rdma_request_t *) ((intptr_t) context & ~1);
ompi_osc_rdma_request_t *request = (ompi_osc_rdma_request_t *) ((intptr_t) context & ~1);
sync = request->sync;

if (0 == OPAL_THREAD_ADD_FETCH32 (&request->outstanding_requests, -1)) {
Expand Down Expand Up @@ -429,7 +429,7 @@ static void ompi_osc_rdma_put_complete_flush (struct mca_btl_base_module_t *btl,

/* the lowest bit is used as a flag indicating this put operation has a request */
if ((intptr_t) context & 0x1) {
ompi_osc_rdma_request_t *request = request = (ompi_osc_rdma_request_t *) ((intptr_t) context & ~1);
ompi_osc_rdma_request_t *request = (ompi_osc_rdma_request_t *) ((intptr_t) context & ~1);
module = request->module;

if (0 == OPAL_THREAD_ADD_FETCH32 (&request->outstanding_requests, -1)) {
Expand Down

0 comments on commit 030e0b5

Please sign in to comment.