diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-10-23 21:38:21 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-10-23 21:38:21 (GMT) |
commit | aef98c3b6f57b1aecea21c44f8c5968d5cfb53c7 (patch) | |
tree | db6a72f03a8177b1dbcfd49ce74c58a604328b1b | |
parent | b8a536b20b1621e360ac5bb29fe4b3f6a99669c1 (diff) | |
download | hdf5-aef98c3b6f57b1aecea21c44f8c5968d5cfb53c7.zip hdf5-aef98c3b6f57b1aecea21c44f8c5968d5cfb53c7.tar.gz hdf5-aef98c3b6f57b1aecea21c44f8c5968d5cfb53c7.tar.bz2 |
[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)
-rw-r--r-- | test/big.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |