diff options
Diffstat (limited to 'src/H5Dio.c')
-rw-r--r-- | src/H5Dio.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c index 5c84efe..a480209 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -1206,6 +1206,7 @@ H5D_contig_read(hsize_t nelmts, H5D_t *dataset, } /* end if */ if (need_bkg && NULL==(bkg_buf=dxpl_cache->bkgr_buf)) { /* Allocate background buffer */ + /* (Need calloc()-like call since memory needs to be initialized) */ if((bkg_buf=H5FL_BLK_CALLOC(type_conv,(request_nelmts*dst_type_size)))==NULL) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for background conversion") } /* end if */ @@ -1455,7 +1456,8 @@ H5D_contig_write(hsize_t nelmts, H5D_t *dataset, } /* end if */ if (need_bkg && NULL==(bkg_buf=dxpl_cache->bkgr_buf)) { /* Allocate background buffer */ - if((bkg_buf=H5FL_BLK_CALLOC(type_conv,(request_nelmts*dst_type_size)))==NULL) + /* (Don't need calloc()-like call since file data is already initialized) */ + if((bkg_buf=H5FL_BLK_MALLOC(type_conv,(request_nelmts*dst_type_size)))==NULL) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for background conversion") } /* end if */ @@ -1716,6 +1718,7 @@ H5D_chunk_read(hsize_t nelmts, H5D_t *dataset, } /* end if */ if (need_bkg && NULL==(bkg_buf=dxpl_cache->bkgr_buf)) { /* Allocate background buffer */ + /* (Need calloc()-like call since memory needs to be initialized) */ if((bkg_buf=H5FL_BLK_CALLOC(type_conv,(request_nelmts*dst_type_size)))==NULL) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for background conversion") } /* end if */ @@ -2073,7 +2076,8 @@ H5D_chunk_write(hsize_t nelmts, H5D_t *dataset, } /* end if */ if (need_bkg && NULL==(bkg_buf=dxpl_cache->bkgr_buf)) { /* Allocate background buffer */ - if((bkg_buf=H5FL_BLK_CALLOC(type_conv,(request_nelmts*dst_type_size)))==NULL) + /* (Don't need calloc()-like call since file data is already initialized) */ + if((bkg_buf=H5FL_BLK_MALLOC(type_conv,(request_nelmts*dst_type_size)))==NULL) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for background conversion") } /* end if */ |