diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2015-11-15 03:32:00 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2015-11-15 03:32:00 (GMT) |
commit | 5f6e580533b83a17b4575b9f305d7fd5b54c1923 (patch) | |
tree | 61b4d2301d0c8598433789026725f7e0eaeb74d6 /hl/test/test_file_image.c | |
parent | 3bdc5d7aa4e95e54eb8c7d28956fa49401e46296 (diff) | |
download | hdf5-5f6e580533b83a17b4575b9f305d7fd5b54c1923.zip hdf5-5f6e580533b83a17b4575b9f305d7fd5b54c1923.tar.gz hdf5-5f6e580533b83a17b4575b9f305d7fd5b54c1923.tar.bz2 |
[svn-r28346] Description:
Bring in cleanups from revise_chunks branch.
Tested on:
MacOSX/64 10.11.1 (amazon) w/serial & parallel
(too minor to require full h5committest)
Diffstat (limited to 'hl/test/test_file_image.c')
-rw-r--r-- | hl/test/test_file_image.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/hl/test/test_file_image.c b/hl/test/test_file_image.c index 831fa23..9b18539 100644 --- a/hl/test/test_file_image.c +++ b/hl/test/test_file_image.c @@ -158,7 +158,7 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags) FAIL_PUTS_ERROR("H5Dclose() failed"); /* get size of the file image i */ - if ((buf_size[i] = H5Fget_file_image(file_id[i], NULL, 0)) < 0) + if ((buf_size[i] = H5Fget_file_image(file_id[i], NULL, (size_t)0)) < 0) FAIL_PUTS_ERROR("H5Fget_file_image() failed"); /* allocate buffer for the file image i */ @@ -370,7 +370,9 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags) H5Aclose(attr_id); } H5E_END_TRY; #endif - file_id[i] = -1; + if (H5Dclose(dset_id[i]) < 0) + FAIL_PUTS_ERROR("H5Dclose() failed"); + dset_id[i] = -1; } /* end if */ else { /* write dataset without extending it */ @@ -399,7 +401,7 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags) /* read open file images and verify data */ for (i = 0; i < open_images; i++) { /* if opening the file image failed, continue next iteration */ - if ((file_id[i] < 0) || (!(input_flags[i] & H5LT_FILE_IMAGE_OPEN_RW ))) + if ((dset_id[i] < 0) || (file_id[i] < 0) || (!(input_flags[i] & H5LT_FILE_IMAGE_OPEN_RW ))) continue; /* open dataset in file image */ |