summaryrefslogtreecommitdiffstats
path: root/src/H5A.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5A.c')
-rw-r--r--src/H5A.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/H5A.c b/src/H5A.c
index ccda374..8f5380f 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -642,7 +642,7 @@ H5Awrite(hid_t attr_id, hid_t dtype_id, const void *buf)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Go write the actual data to the attribute */
- if((ret_value = H5A__write(attr, mem_type, buf, H5AC_dxpl_id)) < 0)
+ if((ret_value = H5A__write(attr, mem_type, buf, dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "unable to write attribute")
done:
@@ -691,7 +691,7 @@ H5Aread(hid_t attr_id, hid_t dtype_id, void *buf)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Go write the actual data to the attribute */
- if((ret_value = H5A__read(attr, mem_type, buf, H5AC_dxpl_id)) < 0)
+ if((ret_value = H5A__read(attr, mem_type, buf, dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_READERROR, FAIL, "unable to read attribute")
done:
@@ -1172,7 +1172,7 @@ H5Arename(hid_t loc_id, const char *old_name, const char *new_name)
/* Avoid thrashing things if the names are the same */
if(HDstrcmp(old_name, new_name)) {
- H5G_loc_t loc; /* Object location */
+ H5G_loc_t loc; /* Object location */
if(H5G_loc(loc_id, & loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
@@ -1204,7 +1204,6 @@ herr_t
H5Arename_by_name(hid_t loc_id, const char *obj_name, const char *old_attr_name,
const char *new_attr_name, hid_t lapl_id)
{
- hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by the library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1221,13 +1220,14 @@ H5Arename_by_name(hid_t loc_id, const char *obj_name, const char *old_attr_name,
if(!new_attr_name || !*new_attr_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no new attribute name")
- /* Verify access property list and get correct dxpl */
- if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, TRUE) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
-
/* Avoid thrashing things if the names are the same */
if(HDstrcmp(old_attr_name, new_attr_name)) {
H5G_loc_t loc; /* Object location */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by the library */
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
if(H5G_loc(loc_id, & loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")