From aef98c3b6f57b1aecea21c44f8c5968d5cfb53c7 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 23 Oct 2001 16:38:21 -0500 Subject: [svn-r4568] Purpose: Code cleanup Description: I had moved an fclose() in my earlier fix and it could lead to a resource leak in certain error conditions. Also, prepared file for Albert to expand to test with files larger than 2GB... :-) Solution: Moved fclose() call back to original position. Put in type cast for FAMILY_SIZE macro. Platforms tested: FreeBSD 4.4 (hawkwind) --- test/big.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/big.c b/test/big.c index 8387160..5f8363e 100644 --- a/test/big.c +++ b/test/big.c @@ -220,7 +220,6 @@ writer (hid_t fapl, int wrt_n) H5P_DEFAULT, buf)<0) goto error; } - fclose(out); if (H5Dclose (d1)<0) goto error; if (H5Dclose (d2)<0) goto error; if (H5Sclose (mem_space)<0) goto error; @@ -228,6 +227,7 @@ writer (hid_t fapl, int wrt_n) if (H5Sclose (space2)<0) goto error; if (H5Fclose (file)<0) goto error; free (buf); + fclose(out); PASSED(); return 0; @@ -373,7 +373,7 @@ main (void) if (H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT)<0) goto error; } else if (H5Pget_fapl_family(fapl, &family_size, NULL)<0) { goto error; - } else if (family_size!=FAMILY_SIZE) { + } else if (family_size!=(hsize_t)FAMILY_SIZE) { printf("Changing family member size from %lu to %lu\n", (unsigned long)family_size, (unsigned long)FAMILY_SIZE); if (H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT)<0) goto error; -- cgit v0.12