[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)
This commit is contained in:
Quincey Koziol 2001-10-23 16:38:21 -05:00
parent b8a536b20b
commit aef98c3b6f

View File

@ -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;