diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-08-28 15:02:54 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-08-28 15:02:54 (GMT) |
commit | ea343ef85416b42f68f28fb1024702c6726f7eea (patch) | |
tree | d5c401bf83f7f5578df06c54f9fd9fb198732ed2 /testpar/t_pflush2.c | |
parent | eb16d8bc2b2f37c7a1d75fe7bf5258eba21515b2 (diff) | |
download | hdf5-ea343ef85416b42f68f28fb1024702c6726f7eea.zip hdf5-ea343ef85416b42f68f28fb1024702c6726f7eea.tar.gz hdf5-ea343ef85416b42f68f28fb1024702c6726f7eea.tar.bz2 |
[svn-r14115] Description:
Remove all plain calls to H5Gopen() from source, replacing them with
either H5Gopen2().
Add test for H5Gopen1().
Reformatted several pieces of code, to clean them up.
Tested on:
FreeBSD/32 6.2 (duty)
FreeBSD/64 6.2 (liberty)
Linux/32 2.6 (kagiso)
Linux/64 2.6 (smirom)
Solaris/32 5.10 (linew)
Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'testpar/t_pflush2.c')
-rw-r--r-- | testpar/t_pflush2.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/testpar/t_pflush2.c b/testpar/t_pflush2.c index 5c3326b..2839cf8 100644 --- a/testpar/t_pflush2.c +++ b/testpar/t_pflush2.c @@ -89,25 +89,26 @@ int check_file(char* name, hid_t fapl) } /* Open some groups */ - if ((groups=H5Gopen(file, "some_groups"))<0) goto error; - for (i=0; i<100; i++) { + if((groups = H5Gopen2(file, "some_groups", H5P_DEFAULT)) < 0) goto error; + for(i = 0; i < 100; i++) { sprintf(name, "grp%02u", (unsigned)i); - if ((grp=H5Gopen(groups, name))<0) goto error; - if (H5Gclose(grp)<0) goto error; + if((grp = H5Gopen2(groups, name, H5P_DEFAULT)) < 0) goto error; + if(H5Gclose(grp) < 0) goto error; } - if (H5Gclose(groups)<0) goto error; - if (H5Dclose(dset)<0) goto error; - if (H5Fclose(file)<0) goto error; - if (H5Pclose(plist)<0) goto error; + if(H5Gclose(groups) < 0) goto error; + if(H5Dclose(dset) < 0) goto error; + if(H5Fclose(file) < 0) goto error; + if(H5Pclose(plist) < 0) goto error; + return 0; -error: - if (H5Fclose(file)<0) goto error; - if (H5Pclose(plist)<0) goto error; +error: + H5E_BEGIN_TRY { + H5Fclose(file); + H5Pclose(plist); + } H5E_END_TRY; return 1; - - } /*------------------------------------------------------------------------- |