Skip to content

Commit e8f8c87

Browse files
author
Luke Robison
committed
OSC/RDMA: Fix Compare_and_swap return value when comp != target
When comparison and target were equal, the return value was not initialized, causing nonsense error codes. Signed-off-by: Luke Robison <lrbison@amazon.com>
1 parent 7b1038a commit e8f8c87

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ompi/mca/osc/rdma/osc_rdma_accumulate.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ static inline int ompi_osc_rdma_cas_local (const void *source_addr, const void *
183183
if (ret) {
184184
goto out;
185185
}
186+
} else {
187+
ret = OMPI_SUCCESS;
186188
}
187189

188190
ompi_osc_rdma_peer_accumulate_cleanup (module, peer, lock_acquired);

0 commit comments

Comments
 (0)