From 95b960a4a030844bfd04077f3c344895a1d71dbb Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 2 Nov 2000 15:48:45 -0500 Subject: [svn-r2793] Purpose: Bug Fix Description: Some of the HRETURN types were incorrect. They were NULL when they should have been FAIL. Solution: Changed the NULLs to FAILs. Platforms tested: Linux --- src/H5Dcontig.c | 12 ++++++------ src/H5Fcontig.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c index a93e410..ccd6860 100644 --- a/src/H5Dcontig.c +++ b/src/H5Dcontig.c @@ -120,7 +120,7 @@ H5F_contig_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, hid_t dxp /* Make certain we don't read off the end of the file */ if (HADDR_UNDEF==(eoa=H5FD_get_eoa(f->shared->lf))) { - HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, + HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to determine file size"); } f->shared->sieve_size=MIN(eoa-addr,f->shared->sieve_buf_size); @@ -151,7 +151,7 @@ H5F_contig_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, hid_t dxp else { /* Allocate room for the data sieve buffer */ if (NULL==(f->shared->sieve_buf=H5MM_malloc(f->shared->sieve_buf_size))) { - HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, + HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } @@ -160,7 +160,7 @@ H5F_contig_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, hid_t dxp /* Make certain we don't read off the end of the file */ if (HADDR_UNDEF==(eoa=H5FD_get_eoa(f->shared->lf))) { - HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, + HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to determine file size"); } f->shared->sieve_size=MIN(eoa-addr,f->shared->sieve_buf_size); @@ -290,7 +290,7 @@ H5F_contig_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, /* Make certain we don't read off the end of the file */ if (HADDR_UNDEF==(eoa=H5FD_get_eoa(f->shared->lf))) { - HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, + HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to determine file size"); } f->shared->sieve_size=MIN(eoa-addr,f->shared->sieve_buf_size); @@ -322,7 +322,7 @@ H5F_contig_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, else { /* Allocate room for the data sieve buffer */ if (NULL==(f->shared->sieve_buf=H5MM_malloc(f->shared->sieve_buf_size))) { - HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, + HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } @@ -331,7 +331,7 @@ H5F_contig_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, /* Make certain we don't read off the end of the file */ if (HADDR_UNDEF==(eoa=H5FD_get_eoa(f->shared->lf))) { - HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, + HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to determine file size"); } f->shared->sieve_size=MIN(eoa-addr,f->shared->sieve_buf_size); diff --git a/src/H5Fcontig.c b/src/H5Fcontig.c index a93e410..ccd6860 100644 --- a/src/H5Fcontig.c +++ b/src/H5Fcontig.c @@ -120,7 +120,7 @@ H5F_contig_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, hid_t dxp /* Make certain we don't read off the end of the file */ if (HADDR_UNDEF==(eoa=H5FD_get_eoa(f->shared->lf))) { - HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, + HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to determine file size"); } f->shared->sieve_size=MIN(eoa-addr,f->shared->sieve_buf_size); @@ -151,7 +151,7 @@ H5F_contig_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, hid_t dxp else { /* Allocate room for the data sieve buffer */ if (NULL==(f->shared->sieve_buf=H5MM_malloc(f->shared->sieve_buf_size))) { - HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, + HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } @@ -160,7 +160,7 @@ H5F_contig_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, hid_t dxp /* Make certain we don't read off the end of the file */ if (HADDR_UNDEF==(eoa=H5FD_get_eoa(f->shared->lf))) { - HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, + HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to determine file size"); } f->shared->sieve_size=MIN(eoa-addr,f->shared->sieve_buf_size); @@ -290,7 +290,7 @@ H5F_contig_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, /* Make certain we don't read off the end of the file */ if (HADDR_UNDEF==(eoa=H5FD_get_eoa(f->shared->lf))) { - HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, + HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to determine file size"); } f->shared->sieve_size=MIN(eoa-addr,f->shared->sieve_buf_size); @@ -322,7 +322,7 @@ H5F_contig_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, else { /* Allocate room for the data sieve buffer */ if (NULL==(f->shared->sieve_buf=H5MM_malloc(f->shared->sieve_buf_size))) { - HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, + HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } @@ -331,7 +331,7 @@ H5F_contig_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, /* Make certain we don't read off the end of the file */ if (HADDR_UNDEF==(eoa=H5FD_get_eoa(f->shared->lf))) { - HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, + HRETURN_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to determine file size"); } f->shared->sieve_size=MIN(eoa-addr,f->shared->sieve_buf_size); -- cgit v0.12