diff options
Diffstat (limited to 'hl/src')
-rw-r--r-- | hl/src/H5DS.c | 4 | ||||
-rw-r--r-- | hl/src/H5IM.c | 11 | ||||
-rw-r--r-- | hl/src/H5LT.c | 14 |
3 files changed, 13 insertions, 16 deletions
diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c index 7b59c18..a29d8ae 100644 --- a/hl/src/H5DS.c +++ b/hl/src/H5DS.c @@ -485,7 +485,7 @@ herr_t H5DSattach_scale(hid_t did, */ /* the attribute must be deleted, in order to the new one can reflect the changes*/ - if (H5Adelete2(dsid, ".", REFERENCE_LIST, H5P_DEFAULT) < 0) + if(H5Adelete(dsid, REFERENCE_LIST) < 0) goto out; /* store the IDX information (index of the dataset that has the DS) */ @@ -835,7 +835,7 @@ herr_t H5DSdetach_scale(hid_t did, */ /* the attribute must be deleted, in order to the new one can reflect the changes*/ - if (H5Adelete2(dsid, ".", REFERENCE_LIST, H5P_DEFAULT) < 0) + if(H5Adelete(dsid, REFERENCE_LIST) < 0) goto out; /* don't do anything for an empty array */ diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c index fa5f87d..ac90cf2 100644 --- a/hl/src/H5IM.c +++ b/hl/src/H5IM.c @@ -597,7 +597,7 @@ herr_t H5IMlink_palette( hid_t loc_id, goto out; /* The attribute must be deleted, in order to the new one can reflect the changes*/ - if(H5Adelete2(image_id, ".", "PALETTE", H5P_DEFAULT) < 0) + if(H5Adelete(image_id, "PALETTE") < 0) goto out; /* Create a new reference for this palette. */ @@ -719,24 +719,23 @@ herr_t H5IMunlink_palette( hid_t loc_id, /* Check if it is really a reference */ if(attr_class == H5T_REFERENCE) { - /* Delete the attribute */ - if(H5Adelete2(image_id, ".", "PALETTE", H5P_DEFAULT) < 0) + if(H5Adelete(image_id, "PALETTE") < 0) goto out; } /* H5T_REFERENCE */ - if ( H5Tclose( attr_type ) < 0) + if(H5Tclose(attr_type) < 0) goto out; /* Close the attribute. */ - if ( H5Aclose( attr_id ) < 0) + if(H5Aclose(attr_id) < 0) goto out; } /* ok_pal */ /* Close the image dataset. */ - if ( H5Dclose( image_id ) < 0) + if(H5Dclose(image_id) < 0) return -1; return 0; diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c index d794912..d47fad1 100644 --- a/hl/src/H5LT.c +++ b/hl/src/H5LT.c @@ -883,7 +883,7 @@ herr_t H5LTset_attribute_string( hid_t loc_id, /* The attribute already exists, delete it */ if(has_attr == 1) - if(H5Adelete2(obj_id, ".", attr_name, H5P_DEFAULT) < 0) + if(H5Adelete(obj_id, attr_name) < 0) goto out; /* Create and write the attribute */ @@ -961,7 +961,7 @@ herr_t H5LT_set_attribute_numerical( hid_t loc_id, /* The attribute already exists, delete it */ if(has_attr == 1) - if(H5Adelete2(obj_id, ".", attr_name, H5P_DEFAULT) < 0) + if(H5Adelete(obj_id, attr_name) < 0) goto out; /* Create the attribute. */ @@ -2837,22 +2837,20 @@ herr_t H5LT_set_attribute_string(hid_t dset_id, has_attr = H5LT_find_attribute(dset_id,name); /* the attribute already exists, delete it */ - if ( has_attr == 1 ) - { - if(H5Adelete2(dset_id, ".", name, H5P_DEFAULT) < 0) + if(has_attr == 1) + if(H5Adelete(dset_id, name) < 0) return FAIL; - } /*------------------------------------------------------------------------- * create the attribute type *------------------------------------------------------------------------- */ - if ((tid = H5Tcopy(H5T_C_S1)) < 0) + if((tid = H5Tcopy(H5T_C_S1)) < 0) return FAIL; size = strlen(buf) + 1; /* extra null term */ - if (H5Tset_size(tid,(size_t)size) < 0) + if(H5Tset_size(tid,(size_t)size) < 0) goto out; if(H5Tset_strpad(tid, H5T_STR_NULLTERM) < 0) |