diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2000-10-04 22:43:11 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2000-10-04 22:43:11 (GMT) |
commit | 3c2e39acd1cbf4b92bc52afaf96ff57222c2fdbc (patch) | |
tree | 2716ca59400c9d7bef95751d35d007e48dfaaa5b /src/H5Fcontig.c | |
parent | c59d21041d8efe6260f0b95efc4a9cae9c48c294 (diff) | |
download | hdf5-3c2e39acd1cbf4b92bc52afaf96ff57222c2fdbc.zip hdf5-3c2e39acd1cbf4b92bc52afaf96ff57222c2fdbc.tar.gz hdf5-3c2e39acd1cbf4b92bc52afaf96ff57222c2fdbc.tar.bz2 |
[svn-r2633] Purpose:
Bug Fix
Description:
Use H5FD_get_eoa instead of H5FD_get_eof to check for reading off the end
of the allocated file space. Using H5FD_get_eof was causing the Stream
VFD to fail.
Solution:
Switched from using H5FD_get_eof to H5FD_get_eoa
Platforms tested:
FreeBSD 4.1.1 (hawkwind)
Diffstat (limited to 'src/H5Fcontig.c')
-rw-r--r-- | src/H5Fcontig.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/H5Fcontig.c b/src/H5Fcontig.c index a051b12..d4430c0 100644 --- a/src/H5Fcontig.c +++ b/src/H5Fcontig.c @@ -44,7 +44,7 @@ H5F_contig_read(H5F_t *f, haddr_t addr, hsize_t size, hid_t dxpl_id, void *_buf/*out*/) { uint8_t *buf = (uint8_t*)_buf; /*cast for arithmetic */ - haddr_t eof; /*end of file address */ + haddr_t eoa; /*end of file address */ FUNC_ENTER(H5F_contig_read, FAIL); @@ -107,11 +107,11 @@ H5F_contig_read(H5F_t *f, haddr_t addr, hsize_t size, hid_t dxpl_id, f->shared->sieve_loc=addr; /* Make certain we don't read off the end of the file */ - if (HADDR_UNDEF==(eof=H5FD_get_eof(f->shared->lf))) { + if (HADDR_UNDEF==(eoa=H5FD_get_eoa(f->shared->lf))) { HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to determine file size"); } - f->shared->sieve_size=MIN(eof-addr,f->shared->sieve_buf_size); + f->shared->sieve_size=MIN(eoa-addr,f->shared->sieve_buf_size); /* Read the new sieve buffer */ if (H5F_block_read(f, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) { @@ -147,11 +147,11 @@ H5F_contig_read(H5F_t *f, haddr_t addr, hsize_t size, hid_t dxpl_id, f->shared->sieve_loc=addr; /* Make certain we don't read off the end of the file */ - if (HADDR_UNDEF==(eof=H5FD_get_eof(f->shared->lf))) { + if (HADDR_UNDEF==(eoa=H5FD_get_eoa(f->shared->lf))) { HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to determine file size"); } - f->shared->sieve_size=MIN(eof-addr,f->shared->sieve_buf_size); + f->shared->sieve_size=MIN(eoa-addr,f->shared->sieve_buf_size); /* Read the new sieve buffer */ if (H5F_block_read(f, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) { @@ -198,7 +198,7 @@ herr_t H5F_contig_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, hid_t dxpl_id, const void *buf) { - haddr_t eof; /*end of file address */ + haddr_t eoa; /*end of file address */ FUNC_ENTER(H5F_block_write, FAIL); @@ -268,11 +268,11 @@ H5F_contig_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, f->shared->sieve_loc=addr; /* Make certain we don't read off the end of the file */ - if (HADDR_UNDEF==(eof=H5FD_get_eof(f->shared->lf))) { + if (HADDR_UNDEF==(eoa=H5FD_get_eoa(f->shared->lf))) { HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to determine file size"); } - f->shared->sieve_size=MIN(eof-addr,f->shared->sieve_buf_size); + f->shared->sieve_size=MIN(eoa-addr,f->shared->sieve_buf_size); /* Read the new sieve buffer */ if (H5F_block_read(f, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) { @@ -309,11 +309,11 @@ H5F_contig_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, f->shared->sieve_loc=addr; /* Make certain we don't read off the end of the file */ - if (HADDR_UNDEF==(eof=H5FD_get_eof(f->shared->lf))) { + if (HADDR_UNDEF==(eoa=H5FD_get_eoa(f->shared->lf))) { HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to determine file size"); } - f->shared->sieve_size=MIN(eof-addr,f->shared->sieve_buf_size); + f->shared->sieve_size=MIN(eoa-addr,f->shared->sieve_buf_size); /* Read the new sieve buffer */ if (H5F_block_read(f, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) { |