diff options
Diffstat (limited to 'src/H5SMcache.c')
-rw-r--r-- | src/H5SMcache.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/H5SMcache.c b/src/H5SMcache.c index 4a9338b..1511fd0 100644 --- a/src/H5SMcache.c +++ b/src/H5SMcache.c @@ -605,7 +605,7 @@ H5SM_list_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5SM_lis if(H5SM_message_encode(p, &(list->messages[x]), &ctx) < 0) HGOTO_ERROR(H5E_SOHM, H5E_CANTFLUSH, FAIL, "unable to write shared message to disk") - p+=H5SM_SOHM_ENTRY_SIZE(f); + p += H5SM_SOHM_ENTRY_SIZE(f); ++mesgs_written; } /* end if */ } /* end for */ @@ -614,6 +614,9 @@ H5SM_list_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5SM_lis /* Compute checksum on buffer */ computed_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0); UINT32ENCODE(p, computed_chksum); +#ifdef H5_CLEAR_MEMORY +HDmemset(p, 0, (list->header->list_size - (p - buf))); +#endif /* H5_CLEAR_MEMORY */ /* Write the list to disk */ HDassert((size_t)(p - buf) <= list->header->list_size); |