diff options
author | James Laird <jlaird@hdfgroup.org> | 2006-11-21 16:02:34 (GMT) |
---|---|---|
committer | James Laird <jlaird@hdfgroup.org> | 2006-11-21 16:02:34 (GMT) |
commit | 59ac4c5e9dfc32077f351267569c274d6caa6f04 (patch) | |
tree | f9492b5965eae3cb3aa7b33ae36192c7042a0000 /src/H5SM.c | |
parent | 4d08b756b2eab945921ddef689b7564d07e6a37f (diff) | |
download | hdf5-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-x | src/H5SM.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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"); |