summaryrefslogtreecommitdiffstats
path: root/src/H5SM.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/H5SM.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/H5SM.c')
-rwxr-xr-xsrc/H5SM.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5SM.c b/src/H5SM.c
index 6c0e3b5..476bcb9 100755
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -426,6 +426,7 @@ H5SM_create_list(H5F_t *f, H5SM_index_header_t * header, hid_t dxpl_id)
/* JAMES: would making fewer operations out of this make it faster? */
for(x=0; x<num_entries; x++)
{
+ list->messages[x].ref_count=0;
list->messages[x].fheap_id=0;
list->messages[x].hash=H5O_HASH_UNDEF;
}
@@ -615,6 +616,9 @@ H5SM_write_mesg(H5F_t *f, hid_t dxpl_id, H5SM_index_header_t *header,
if(NULL == (encoding_buf = H5MM_calloc(buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate buffer for encoding");
+ /* JAMES: make purify happy. I think calloc above should do this. */
+ HDmemset(encoding_buf, 0, buf_size);
+
if(H5O_encode(f, encoding_buf, mesg, type_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTENCODE, FAIL, "can't encode message to be shared");