summaryrefslogtreecommitdiffstats
path: root/src/H5Fcontig.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-05-20 13:39:57 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-05-20 13:39:57 (GMT)
commitc581a0723521cd20d62f16af39457106735a8629 (patch)
tree84034068e6c6db10fb0386cae36a5510cde54d5a /src/H5Fcontig.c
parente12beea6244555171693821481db5c31e1090e0e (diff)
downloadhdf5-c581a0723521cd20d62f16af39457106735a8629.zip
hdf5-c581a0723521cd20d62f16af39457106735a8629.tar.gz
hdf5-c581a0723521cd20d62f16af39457106735a8629.tar.bz2
[svn-r5439] Purpose:
Code cleanup Description: Change variable casts to use H5_ASSIGN_OVERFLOW, or check for overflow before the cast with H5_CHECK_OVERFLOW. Platforms tested: FreeBSD 4.5 (sleipnir)
Diffstat (limited to 'src/H5Fcontig.c')
-rw-r--r--src/H5Fcontig.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/H5Fcontig.c b/src/H5Fcontig.c
index 301aae9..e80a67f 100644
--- a/src/H5Fcontig.c
+++ b/src/H5Fcontig.c
@@ -432,7 +432,7 @@ H5F_contig_readv(H5F_t *f, hsize_t _max_data, H5FD_mem_t type, haddr_t _addr,
/* Compute the size of the sieve buffer */
/* Don't read off the end of the file, don't read past the end of the data element and don't read more than the buffer size */
- f->shared->sieve_size=(size_t)MIN(rel_eoa-f->shared->sieve_loc,MIN(max_data,f->shared->sieve_buf_size));
+ H5_ASSIGN_OVERFLOW(f->shared->sieve_size,MIN(rel_eoa-f->shared->sieve_loc,MIN(max_data,f->shared->sieve_buf_size)),hsize_t,size_t);
/* Update local copies of sieve information */
sieve_start=f->shared->sieve_loc;
@@ -494,7 +494,7 @@ H5F_contig_readv(H5F_t *f, hsize_t _max_data, H5FD_mem_t type, haddr_t _addr,
rel_eoa=abs_eoa-f->shared->base_addr;
/* Compute the size of the sieve buffer */
- f->shared->sieve_size=(size_t)MIN(rel_eoa-f->shared->sieve_loc,MIN(max_data,f->shared->sieve_buf_size));
+ H5_ASSIGN_OVERFLOW(f->shared->sieve_size,MIN(rel_eoa-f->shared->sieve_loc,MIN(max_data,f->shared->sieve_buf_size)),hsize_t,size_t);
/* Read the new sieve buffer */
if (H5F_block_read(f, type, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) {
@@ -912,7 +912,7 @@ H5F_contig_writev(H5F_t *f, hsize_t _max_data, H5FD_mem_t type, haddr_t _addr,
/* Compute the size of the sieve buffer */
/* Don't read off the end of the file, don't read past the end of the data element and don't read more than the buffer size */
- f->shared->sieve_size=(size_t)MIN(rel_eoa-f->shared->sieve_loc,MIN(max_data,f->shared->sieve_buf_size));
+ H5_ASSIGN_OVERFLOW(f->shared->sieve_size,MIN(rel_eoa-f->shared->sieve_loc,MIN(max_data,f->shared->sieve_buf_size)),hsize_t,size_t);
/* Update local copies of sieve information */
sieve_start=f->shared->sieve_loc;
@@ -979,7 +979,7 @@ H5F_contig_writev(H5F_t *f, hsize_t _max_data, H5FD_mem_t type, haddr_t _addr,
rel_eoa=abs_eoa-f->shared->base_addr;
/* Compute the size of the sieve buffer */
- f->shared->sieve_size=(size_t)MIN(rel_eoa-f->shared->sieve_loc,MIN(max_data,f->shared->sieve_buf_size));
+ H5_ASSIGN_OVERFLOW(f->shared->sieve_size,MIN(rel_eoa-f->shared->sieve_loc,MIN(max_data,f->shared->sieve_buf_size)),hsize_t,size_t);
/* Check if there is any point in reading the data from the file */
if(f->shared->sieve_size>size) {