diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-10-01 14:14:43 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-10-01 14:14:43 (GMT) |
commit | c8845f3337aadd599c1630a827010f379778a915 (patch) | |
tree | ebe777c3e0b83f4c4cec9212731da9ebe0a0cfd3 /test/gen_old_group.c | |
parent | 10343c197906415388f2a4c8d292e21d25cf7381 (diff) | |
parent | f1ba03cea5b82699a984c80bd2deac14fdc8df18 (diff) | |
download | hdf5-c8845f3337aadd599c1630a827010f379778a915.zip hdf5-c8845f3337aadd599c1630a827010f379778a915.tar.gz hdf5-c8845f3337aadd599c1630a827010f379778a915.tar.bz2 |
Merge pull request #2909 in HDFFV/hdf5 from ~BYRN/hdf5_clang_format:hdf5_1_12 to hdf5_1_12
* commit 'f1ba03cea5b82699a984c80bd2deac14fdc8df18':
Source formatted
Diffstat (limited to 'test/gen_old_group.c')
-rw-r--r-- | test/gen_old_group.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/test/gen_old_group.c b/test/gen_old_group.c index d109329..1b69894 100644 --- a/test/gen_old_group.c +++ b/test/gen_old_group.c @@ -31,28 +31,34 @@ #define FILENAME "group_old.h5" -int main(void) +int +main(void) { - hid_t fid = -1; /* File ID */ - hid_t gid = -1; /* Group creation property list ID */ + hid_t fid = -1; /* File ID */ + hid_t gid = -1; /* Group creation property list ID */ /* Create file for test groups */ - if((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) <0) goto error; + if ((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; /* Create empty group that uses "symbol table" form to store links */ - if((gid = H5Gcreate2(fid, "old", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; - if(H5Gclose(gid) < 0) goto error; + if ((gid = H5Gcreate2(fid, "old", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + if (H5Gclose(gid) < 0) + goto error; /* Close file */ - if(H5Fclose(fid) < 0) goto error; + if (H5Fclose(fid) < 0) + goto error; return 0; error: - H5E_BEGIN_TRY { + H5E_BEGIN_TRY + { H5Dclose(gid); H5Fclose(fid); - } H5E_END_TRY; + } + H5E_END_TRY; return 1; } - |