diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2005-09-12 06:02:55 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2005-09-12 06:02:55 (GMT) |
commit | 5ffde305cdf2c167234f1ffb38adf557380f2234 (patch) | |
tree | f211c5a72d7332885ab83eca1270bcb131e1c6c9 /src/H5Pocpl.c | |
parent | 966f5f42368663fb589807ae28b2887b98ed8067 (diff) | |
download | hdf5-5ffde305cdf2c167234f1ffb38adf557380f2234.zip hdf5-5ffde305cdf2c167234f1ffb38adf557380f2234.tar.gz hdf5-5ffde305cdf2c167234f1ffb38adf557380f2234.tar.bz2 |
[svn-r11384] Purpose:
Code cleanup
Description:
Merge back changes from "compact group" work that improve the
infrastructure of the library and may impact others. In this round of
merging, that includes:
- Move datatype allocation into single internal routine, instead of
duplicated code that was spread out in a dozen or so places.
- Clean up guts of object header routines (H5O_*) to allow for some of
the fancieroperations that need to be performed on groups, along with
some general improvements.
- Added a new error code
- Some minor cleanups in other code....
Platforms tested:
FreeBSD 4.11 (sleipnir)
Linux 2.4
Mac OS X
Diffstat (limited to 'src/H5Pocpl.c')
-rwxr-xr-x | src/H5Pocpl.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c index 14a477d..7132a93 100755 --- a/src/H5Pocpl.c +++ b/src/H5Pocpl.c @@ -41,13 +41,13 @@ herr_t H5Pset_create_intermediate_group(hid_t plist_id, unsigned crt_intmd_group) { H5P_genplist_t *plist; /* Property list pointer */ - herr_t ret_value=SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(H5Pset_create_intermediate_group, FAIL); /* Get the plist structure */ - if(NULL == (plist = H5I_object(plist_id))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, NULL, "can't find object for ID") + if(NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Set value */ crt_intmd_group = crt_intmd_group > 0 ? 1 : 0; @@ -75,16 +75,16 @@ herr_t H5Pget_create_intermediate_group(hid_t plist_id, unsigned *crt_intmd_group /*out*/) { H5P_genplist_t *plist; /* Property list pointer */ - herr_t ret_value=SUCCEED; /* return value */ + herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(H5Pget_create_intermediate_group, FAIL); /* Get the plist structure */ - if(NULL == (plist = H5I_object(plist_id))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, NULL, "can't find object for ID") + if(NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Get values */ - if (crt_intmd_group) + if(crt_intmd_group) if(H5P_get(plist, H5G_CRT_INTERMEDIATE_GROUP_NAME, crt_intmd_group) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get intermediate group creation flag") |