diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2015-07-15 20:33:50 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2015-07-15 20:33:50 (GMT) |
commit | 5065c139c78c1ff9d8c21f98a46d969a31f254be (patch) | |
tree | 5e7550e1139058e9968db63857274fde457a0e37 /src/H5B2cache.c | |
parent | 1ed71c503796eea0e746726f041e2b5b4e181bf2 (diff) | |
parent | 12b86abf18d831a2eeb337146187e220a50fafb2 (diff) | |
download | hdf5-5065c139c78c1ff9d8c21f98a46d969a31f254be.zip hdf5-5065c139c78c1ff9d8c21f98a46d969a31f254be.tar.gz hdf5-5065c139c78c1ff9d8c21f98a46d969a31f254be.tar.bz2 |
[svn-r27397] Merge revisions 27255 through 27393 from trunk to vds branch.
Tested: ummon
Diffstat (limited to 'src/H5B2cache.c')
-rw-r--r-- | src/H5B2cache.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/H5B2cache.c b/src/H5B2cache.c index 64e304c..9e43ff8 100644 --- a/src/H5B2cache.c +++ b/src/H5B2cache.c @@ -393,7 +393,7 @@ H5B2__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le UINT32ENCODE(image, metadata_chksum); /* Sanity check */ - HDassert((size_t)(image - (uint8_t *)_image) <= len); + HDassert((size_t)(image - (uint8_t *)_image) == len); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5B2__cache_hdr_serialize() */ @@ -698,6 +698,11 @@ H5B2__cache_int_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le /* Sanity check */ HDassert((size_t)(image - (uint8_t *)_image) <= len); +#ifdef H5_CLEAR_MEMORY + /* Clear rest of internal node */ + HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image)); +#endif /* H5_CLEAR_MEMORY */ + done: FUNC_LEAVE_NOAPI(ret_value) } /* H5B2__cache_int_serialize() */ @@ -970,6 +975,11 @@ H5B2__cache_leaf_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED l /* Sanity check */ HDassert((size_t)(image - (uint8_t *)_image) <= len); +#ifdef H5_CLEAR_MEMORY + /* Clear rest of leaf node */ + HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image)); +#endif /* H5_CLEAR_MEMORY */ + done: FUNC_LEAVE_NOAPI(ret_value) } /* H5B2__cache_leaf_serialize() */ |