Skip to content

Commit cefee2e

Browse files
committed
portals4: use PtlHandleIsEqual() to compare handles - more fixes
Signed-off-by: Todd Kordenbrock <[email protected]>
1 parent 526b0a3 commit cefee2e

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

ompi/mca/mtl/portals4/mtl_portals4_cancel.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ ompi_mtl_portals4_cancel(struct mca_mtl_base_module_t* mtl,
4545
receive completion event... */
4646
ompi_mtl_portals4_progress();
4747

48-
if (PTL_INVALID_HANDLE != recvreq->me_h) {
48+
if (!PtlHandleIsEqual(recvreq->me_h, PTL_INVALID_HANDLE)) {
4949
ret = PtlMEUnlink(recvreq->me_h);
5050
if (PTL_OK == ret) {
5151
recvreq->super.super.ompi_req->req_status._cancelled = true;

ompi/mca/mtl/portals4/mtl_portals4_recv_short.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ ompi_mtl_portals4_recv_short_block_alloc(bool release_on_free)
162162
static int
163163
ompi_mtl_portals4_recv_short_block_free(ompi_mtl_portals4_recv_short_block_t *block)
164164
{
165-
if (PTL_INVALID_HANDLE != block->me_h) {
165+
if (!PtlHandleIsEqual(block->me_h, PTL_INVALID_HANDLE)) {
166166
PtlMEUnlink(block->me_h);
167167
block->me_h = PTL_INVALID_HANDLE;
168168
}

ompi/mca/osc/portals4/osc_portals4_component.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -615,10 +615,10 @@ component_select(struct ompi_win_t *win, void **base, size_t size, ptrdiff_t dis
615615

616616
error:
617617
/* BWB: FIX ME: This is all wrong... */
618-
if (0 != module->ct_h) PtlCTFree(module->ct_h);
619-
if (0 != module->data_me_h) PtlMEUnlink(module->data_me_h);
620-
if (0 != module->req_md_h) PtlMDRelease(module->req_md_h);
621-
if (0 != module->md_h) PtlMDRelease(module->md_h);
618+
if (!PtlHandleIsEqual(module->ct_h, PTL_INVALID_HANDLE)) PtlCTFree(module->ct_h);
619+
if (!PtlHandleIsEqual(module->data_me_h, PTL_INVALID_HANDLE)) PtlMEUnlink(module->data_me_h);
620+
if (!PtlHandleIsEqual(module->req_md_h, PTL_INVALID_HANDLE)) PtlMDRelease(module->req_md_h);
621+
if (!PtlHandleIsEqual(module->md_h, PTL_INVALID_HANDLE)) PtlMDRelease(module->md_h);
622622
if (NULL != module->comm) ompi_comm_free(&module->comm);
623623
if (NULL != module) free(module);
624624

opal/mca/btl/portals4/btl_portals4_frag.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static void mca_btl_portals4_frag_eager_constructor(mca_btl_portals4_frag_t *fra
4545

4646
static void mca_btl_portals4_frag_eager_destructor(mca_btl_portals4_frag_t *frag)
4747
{
48-
if (PTL_INVALID_HANDLE != frag->me_h) {
48+
if (!PtlHandleIsEqual(frag->me_h, PTL_INVALID_HANDLE)) {
4949
PtlMEUnlink(frag->me_h);
5050
frag->me_h = PTL_INVALID_HANDLE;
5151
}

0 commit comments

Comments
 (0)