From 51d29f215c006345297b98ad7cb28a68e4b2d6df Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 13 May 2003 13:31:57 -0500 Subject: [svn-r6860] Purpose: Small code cleanup Description: Remove redundant sanity check. Added a note about a potential bug. Platforms tested: FreeBSD 4.8 (sleipnir) h5committest not necessary. --- src/H5Dio.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/H5Dio.c b/src/H5Dio.c index e447c4f..6d66ae3 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -994,8 +994,12 @@ H5D_contig_read(hsize_t nelmts, H5D_t *dataset, const H5T_t *mem_type, const H5S src_type_size = H5T_get_size(dataset->type); dst_type_size = H5T_get_size(mem_type); target_size = H5P_peek_size_t(dx_plist,H5D_XFER_MAX_TEMP_BUF_NAME); + /* XXX: This could cause a problem if the user sets their buffer size + * to the same size as the default, and then the dataset elements are + * too large for the buffer... - QAK + */ if(target_size==H5D_XFER_MAX_TEMP_BUF_DEF && - target_sizetype); target_size = H5P_peek_size_t(dx_plist,H5D_XFER_MAX_TEMP_BUF_NAME); + /* XXX: This could cause a problem if the user sets their buffer size + * to the same size as the default, and then the dataset elements are + * too large for the buffer... - QAK + */ if(target_size==H5D_XFER_MAX_TEMP_BUF_DEF && - target_sizetype); dst_type_size = H5T_get_size(mem_type); target_size = H5P_peek_size_t(dx_plist,H5D_XFER_MAX_TEMP_BUF_NAME); + /* XXX: This could cause a problem if the user sets their buffer size + * to the same size as the default, and then the dataset elements are + * too large for the buffer... - QAK + */ if(target_size==H5D_XFER_MAX_TEMP_BUF_DEF && - target_sizetype); target_size = H5P_peek_size_t(dx_plist,H5D_XFER_MAX_TEMP_BUF_NAME); + /* XXX: This could cause a problem if the user sets their buffer size + * to the same size as the default, and then the dataset elements are + * too large for the buffer... - QAK + */ if(target_size==H5D_XFER_MAX_TEMP_BUF_DEF && - target_size