From ee65e2eb8c2292f5ad45452fe6521c8d944d96d9 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Thu, 23 Apr 1998 17:02:30 -0500 Subject: [svn-r358] H5Fcreate did not accept EXCL creation flag correctly. Fixed the typo where it should have checked exclusive use of EXCL or TRUNC flags. --- src/H5F.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/H5F.c b/src/H5F.c index 26117ad..211b54d 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -1075,7 +1075,7 @@ H5Fcreate(const char *filename, uintn flags, hid_t create_id, if (flags & ~(H5F_ACC_EXCL|H5F_ACC_TRUNC|H5F_ACC_DEBUG)) { HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid flags"); } - if ((flags & H5F_ACC_EXCL) && (flags & H5F_ACC_EXCL)) { + if ((flags & H5F_ACC_EXCL) && (flags & H5F_ACC_TRUNC)) { HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "mutually exclusive flags for file creation"); } @@ -1465,7 +1465,6 @@ H5F_block_read(H5F_t *f, const haddr_t *addr, hsize_t size, void *buf) FUNC_ENTER(H5F_block_read, FAIL); - if (0==size) return 0; assert (size < MAX_SIZET); /* convert the relative address to an absolute address */ @@ -1510,7 +1509,6 @@ H5F_block_write(H5F_t *f, const haddr_t *addr, hsize_t size, const void *buf) FUNC_ENTER(H5F_block_write, FAIL); - if (0==size) return 0; assert (size < MAX_SIZET); if (0 == (f->intent & H5F_ACC_RDWR)) { -- cgit v0.12