diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2004-04-08 21:22:21 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2004-04-08 21:22:21 (GMT) |
commit | 270d097bd1a6ab00e8e90c214a47a33d26d19bd5 (patch) | |
tree | ba6724a0a9c719c1b69cb47f03c32ae385216487 /src/H5A.c | |
parent | aa5e1dc4d24d8a80001d3c727523b3df47eb2d15 (diff) | |
download | hdf5-270d097bd1a6ab00e8e90c214a47a33d26d19bd5.zip hdf5-270d097bd1a6ab00e8e90c214a47a33d26d19bd5.tar.gz hdf5-270d097bd1a6ab00e8e90c214a47a33d26d19bd5.tar.bz2 |
[svn-r8330] Purpose: Last step of check-in for Null dataspace
Description: Mainly are header message changes for dataspace. In last round
of check-in, a new header message for dataspace to created, which is not a good
way. Now, there will be no new message for dataspace, but just add the type of
dataspace in the message while increment its version number. Backward compatibility
is addressed. The attribute design is modified accordingly.
Platforms tested: h5committest
Diffstat (limited to 'src/H5A.c')
-rw-r--r-- | src/H5A.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -267,7 +267,7 @@ H5A_create(const H5G_entry_t *ent, const char *name, const H5T_t *type, else attr->dt_size=H5O_raw_size(H5O_DTYPE_ID,attr->ent.file,type); assert(attr->dt_size>0); - attr->ds_size=H5O_raw_size(H5O_SDSPACE_ID,attr->ent.file,&(space->extent.u.simple)); + attr->ds_size=H5O_raw_size(H5O_SDSPACE_ID,attr->ent.file,&(space->extent)); assert(attr->ds_size>0); H5_ASSIGN_OVERFLOW(attr->data_size,H5S_get_simple_extent_npoints(attr->ds)*H5T_get_size(attr->dt),hssize_t,size_t); @@ -1555,7 +1555,7 @@ H5A_close(H5A_t *attr) assert(attr); /* Check if the attribute has any data yet, if not, fill with zeroes */ - if(attr->ent_opened && !attr->initialized) { + if(attr->ent_opened && !attr->initialized && attr->data_size) { uint8_t *tmp_buf=H5MM_calloc(attr->data_size); if (NULL == tmp_buf) HGOTO_ERROR(H5E_ATTR, H5E_NOSPACE, FAIL, "memory allocation failed for attribute fill-value") |