diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2023-09-08 23:06:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-08 23:06:23 (GMT) |
commit | 117d579c326f64d09d71e28cb0135bbd16a5232e (patch) | |
tree | 384ac7e1e3b9881e6d6ab783ee0391ab7adc1f29 /test/lheap.c | |
parent | 2345f901b26277f643dd91a528e4da975f4e75c1 (diff) | |
download | hdf5-117d579c326f64d09d71e28cb0135bbd16a5232e.zip hdf5-117d579c326f64d09d71e28cb0135bbd16a5232e.tar.gz hdf5-117d579c326f64d09d71e28cb0135bbd16a5232e.tar.bz2 |
Consistent initialization of hid_t in the tests (#3521)
Diffstat (limited to 'test/lheap.c')
-rw-r--r-- | test/lheap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lheap.c b/test/lheap.c index 8ffb4b6..182966b 100644 --- a/test/lheap.c +++ b/test/lheap.c @@ -42,7 +42,7 @@ int main(void) { hid_t fapl = H5P_DEFAULT; /* file access properties */ - hid_t file = -1; /* hdf5 file */ + hid_t file = H5I_INVALID_HID; /* hdf5 file */ H5F_t *f = NULL; /* hdf5 file pointer */ char filename[1024]; /* file name */ haddr_t heap_addr; /* local heap address */ @@ -176,7 +176,7 @@ main(void) TESTING("opening pre-created file with non-default sizes"); { const char *testfile = H5_get_srcdir_filename(TESTFILE); /* Corrected test file name */ - hid_t dset = -1; + hid_t dset = H5I_INVALID_HID; file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT); if (file >= 0) { if ((dset = H5Dopen2(file, "/Dataset1", H5P_DEFAULT)) < 0) |