summaryrefslogtreecommitdiffstats
path: root/src/H5SMcache.c
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2006-11-21 16:02:34 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2006-11-21 16:02:34 (GMT)
commit59ac4c5e9dfc32077f351267569c274d6caa6f04 (patch)
treef9492b5965eae3cb3aa7b33ae36192c7042a0000 /src/H5SMcache.c
parent4d08b756b2eab945921ddef689b7564d07e6a37f (diff)
downloadhdf5-59ac4c5e9dfc32077f351267569c274d6caa6f04.zip
hdf5-59ac4c5e9dfc32077f351267569c274d6caa6f04.tar.gz
hdf5-59ac4c5e9dfc32077f351267569c274d6caa6f04.tar.bz2
[svn-r12957] Clean up some purify warnings in the code by making sure that
memory is always initialized. Tested on heping, kagiso, and juniper.
Diffstat (limited to 'src/H5SMcache.c')
-rw-r--r--src/H5SMcache.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5SMcache.c b/src/H5SMcache.c
index 57c181b..85b46d5 100644
--- a/src/H5SMcache.c
+++ b/src/H5SMcache.c
@@ -388,6 +388,9 @@ H5SM_flush_list(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5SM_lis
size_t size; /* Header size on disk */
hsize_t x;
+ /* JAMES: consider only writing as many messages as necessary, and then adding a
+ * blank "end of list" message or something?
+ */
size = H5SM_LIST_SIZE(f, list->header->num_messages);
/* Encode the list */
@@ -502,6 +505,7 @@ H5SM_load_list(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED *udata1,
for(x=header->num_messages; x<header->list_to_btree; x++)
{
list->messages[x].fheap_id = 0; /* JAMES: would making this one operation make it faster? */
+ list->messages[x].ref_count = 0;
list->messages[x].hash = H5O_HASH_UNDEF;
}