summaryrefslogtreecommitdiffstats
path: root/test/gen_bogus.c
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2023-09-08 23:06:23 (GMT)
committerGitHub <noreply@github.com>2023-09-08 23:06:23 (GMT)
commit117d579c326f64d09d71e28cb0135bbd16a5232e (patch)
tree384ac7e1e3b9881e6d6ab783ee0391ab7adc1f29 /test/gen_bogus.c
parent2345f901b26277f643dd91a528e4da975f4e75c1 (diff)
downloadhdf5-117d579c326f64d09d71e28cb0135bbd16a5232e.zip
hdf5-117d579c326f64d09d71e28cb0135bbd16a5232e.tar.gz
hdf5-117d579c326f64d09d71e28cb0135bbd16a5232e.tar.bz2
Consistent initialization of hid_t in the tests (#3521)
Diffstat (limited to 'test/gen_bogus.c')
-rw-r--r--test/gen_bogus.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/gen_bogus.c b/test/gen_bogus.c
index 5ace0c9..c8f335d 100644
--- a/test/gen_bogus.c
+++ b/test/gen_bogus.c
@@ -40,10 +40,10 @@
static int
generate_datasets(hid_t loc_id, unsigned bogus_id)
{
- hid_t sid = -1; /* Dataspace ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t did = -1; /* Dataset ID */
- uint8_t bogus_flags = 0; /* Flags for bogus message */
+ hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
+ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list ID */
+ hid_t did = H5I_INVALID_HID; /* Dataset ID */
+ uint8_t bogus_flags = 0; /* Flags for bogus message */
/* Create dataspace for datasets */
if ((sid = H5Screate(H5S_SCALAR)) < 0)
@@ -140,8 +140,8 @@ int
main(void)
{
#ifdef H5O_ENABLE_BOGUS
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
+ hid_t fid = H5I_INVALID_HID; /* File ID */
+ hid_t gid = H5I_INVALID_HID; /* Group ID */
/* Create file for test datasets */
if ((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)