summaryrefslogtreecommitdiffstats
path: root/src/H5Ocopy.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-03-19 03:51:19 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-03-19 03:51:19 (GMT)
commitd812c6fe60fec2451d8d78b8fb51547628307a6c (patch)
treefb1f02516e6dfe5abce1cdb0155046b5d68a73d5 /src/H5Ocopy.c
parentc31460c1b76c8d11534b57f025c57bdff9321f44 (diff)
downloadhdf5-d812c6fe60fec2451d8d78b8fb51547628307a6c.zip
hdf5-d812c6fe60fec2451d8d78b8fb51547628307a6c.tar.gz
hdf5-d812c6fe60fec2451d8d78b8fb51547628307a6c.tar.bz2
Cleanup API context function usage.
Diffstat (limited to 'src/H5Ocopy.c')
-rw-r--r--src/H5Ocopy.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index 3ca5540..b5a3bdf 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -208,7 +208,6 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
{
H5G_loc_t loc; /* Source group group location */
H5G_loc_t dst_loc; /* Destination group location */
-hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -225,21 +224,15 @@ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
if(!dst_name || !*dst_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination name specified")
-/* Set API context */
-if(H5CX_push() < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set API context")
-api_ctx_pushed = TRUE;
-/* Set up collective metadata if appropriate */
-if(H5CX_set_loc(src_loc_id, TRUE) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set collective metadata read info")
+ /* Set up collective metadata if appropriate */
+ if(H5CX_set_loc(src_loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set collective metadata read info")
/* Call internal routine to copy object */
if(H5O__copy(&loc, src_name, &dst_loc, dst_name, ocpypl_id, lcpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
done:
-if(api_ctx_pushed && H5CX_pop() < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTRESET, H5I_INVALID_HID, "can't reset API context")
FUNC_LEAVE_API(ret_value)
} /* end H5Ocopy() */