diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-08-15 20:07:18 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-08-15 20:07:18 (GMT) |
commit | 2e4c7f1107c5d7a72c34b1f19d1a9ce5b08aa43b (patch) | |
tree | 21f20dd42522b9395d76c17fb3f2ed8ae4519e8a /src/H5P.c | |
parent | 2147a97e4b13f16288a4c8e7cddbfede0b11cb73 (diff) | |
download | hdf5-2e4c7f1107c5d7a72c34b1f19d1a9ce5b08aa43b.zip hdf5-2e4c7f1107c5d7a72c34b1f19d1a9ce5b08aa43b.tar.gz hdf5-2e4c7f1107c5d7a72c34b1f19d1a9ce5b08aa43b.tar.bz2 |
[svn-r7373] Purpose:
Code cleanup
Description:
Cleanup H5Pclose code and also switch a few internal users of H5Pclose
to use H5I_dec_ref instead.
Platforms tested:
FreeBSD 4.8 (sleipnir)
too small for h5committest
Diffstat (limited to 'src/H5P.c')
-rw-r--r-- | src/H5P.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -5164,7 +5164,6 @@ done: herr_t H5Pclose(hid_t plist_id) { - H5P_genplist_t *plist; /* Property list created */ herr_t ret_value=SUCCEED; /* return value */ FUNC_ENTER_API(H5Pclose, FAIL); @@ -5174,17 +5173,13 @@ H5Pclose(hid_t plist_id) HGOTO_DONE(SUCCEED); /* Check arguments. */ - if (NULL == (plist = H5I_object_verify(plist_id, H5I_GENPROP_LST))) + if (H5I_GENPROP_LST != H5I_get_type(plist_id)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Close the property list */ - if (H5P_close(plist) < 0) + if (H5I_dec_ref(plist_id) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "can't close"); - /* Remove the property list from the ID manager now */ - if (NULL == H5I_remove(plist_id)) - HGOTO_ERROR(H5E_ARGS, H5E_CANTDELETE, FAIL, "can't delete property list"); - done: FUNC_LEAVE_API(ret_value); } /* H5Pclose() */ |