diff options
author | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2019-06-25 17:39:35 (GMT) |
---|---|---|
committer | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2019-06-25 17:39:35 (GMT) |
commit | 35c9af8371c4da7f5327c76ddab097b442128f59 (patch) | |
tree | d51be51c385a9b463388ba154efc3fa37cad49e8 /src/H5Oattr.c | |
parent | c752332bfd0e9c3090f3a0c02d0253cd45c2e2ce (diff) | |
parent | 1d8f7bf297100ec11204442708a7f670a89f3f02 (diff) | |
download | hdf5-inactive/parallel_vds_develop.zip hdf5-inactive/parallel_vds_develop.tar.gz hdf5-inactive/parallel_vds_develop.tar.bz2 |
Merge branch 'develop' into parallel_vds_developinactive/parallel_vds_develop
Diffstat (limited to 'src/H5Oattr.c')
-rw-r--r-- | src/H5Oattr.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/H5Oattr.c b/src/H5Oattr.c index c420046..f685a00c 100644 --- a/src/H5Oattr.c +++ b/src/H5Oattr.c @@ -200,7 +200,7 @@ H5O_attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, * What's actually shared, though, is only the extent. */ if(NULL == (attr->shared->ds = H5FL_CALLOC(H5S_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* Decode attribute's dataspace extent */ if((extent = (H5S_extent_t *)(H5O_MSG_SDSPACE->decode)(f, open_oh, @@ -208,7 +208,7 @@ H5O_attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, NULL, "can't decode attribute dataspace") /* Copy the extent information to the dataspace */ - HDmemcpy(&(attr->shared->ds->extent), extent, sizeof(H5S_extent_t)); + H5MM_memcpy(&(attr->shared->ds->extent), extent, sizeof(H5S_extent_t)); /* Release temporary extent information */ extent = H5FL_FREE(H5S_extent_t, extent); @@ -240,7 +240,7 @@ H5O_attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, if(attr->shared->data_size) { if(NULL == (attr->shared->data = H5FL_BLK_MALLOC(attr_buf, attr->shared->data_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") - HDmemcpy(attr->shared->data, p, attr->shared->data_size); + H5MM_memcpy(attr->shared->data, p, attr->shared->data_size); } /* end if */ /* Increment the reference count for this object header message in cache(compact @@ -253,15 +253,11 @@ H5O_attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, done: if(NULL == ret_value) if(attr) { - if(attr->shared) { - /* Free any dynamically allocated items */ - if(H5A__free(attr) < 0) + /* Free any dynamically allocated items */ + if(attr->shared) + if(H5A__shared_free(attr) < 0) HDONE_ERROR(H5E_ATTR, H5E_CANTRELEASE, NULL, "can't release attribute info") - /* Destroy shared attribute struct */ - attr->shared = H5FL_FREE(H5A_shared_t, attr->shared); - } /* end if */ - attr = H5FL_FREE(H5A_t, attr); } /* end if */ @@ -336,7 +332,7 @@ H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg) *p++ = attr->shared->encoding; /* Write the name including null terminator */ - HDmemcpy(p, attr->shared->name, name_len); + H5MM_memcpy(p, attr->shared->name, name_len); if(attr->shared->version < H5O_ATTR_VERSION_2) { /* Pad to the correct number of bytes */ HDmemset(p + name_len, 0, H5O_ALIGN_OLD(name_len) - name_len); @@ -369,7 +365,7 @@ H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg) /* Store attribute data. If there's no data, store 0 as fill value. */ if(attr->shared->data) - HDmemcpy(p, attr->shared->data, attr->shared->data_size); + H5MM_memcpy(p, attr->shared->data, attr->shared->data_size); else HDmemset(p, 0, attr->shared->data_size); |