diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2021-04-19 21:51:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-19 21:51:18 (GMT) |
commit | d3384b2e8e5fafd9f3aa90e738ca18d5ddeeb3c1 (patch) | |
tree | 20fd24fe7c410027a17dac3907e6d289d34b365d /src | |
parent | b2c78e15cf2e78221c0f04fa47107f9ce94393fe (diff) | |
download | hdf5-d3384b2e8e5fafd9f3aa90e738ca18d5ddeeb3c1.zip hdf5-d3384b2e8e5fafd9f3aa90e738ca18d5ddeeb3c1.tar.gz hdf5-d3384b2e8e5fafd9f3aa90e738ca18d5ddeeb3c1.tar.bz2 |
Fixes incorrect usage of H5I_BADID (#554)
* Committing clang-format changes
* Fixes incorrect use of H5I_BADID
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/H5R.c | 2 | ||||
-rw-r--r-- | src/H5Rdeprec.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -185,7 +185,7 @@ H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id, hid_t oapl_id, HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer") if (!name || !*name) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given") - if ((space_id == H5I_BADID) || (space_id == H5S_ALL)) + if ((space_id == H5I_INVALID_HID) || (space_id == H5S_ALL)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "reference region dataspace id must be valid") if (NULL == (space = (struct H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") diff --git a/src/H5Rdeprec.c b/src/H5Rdeprec.c index b5d0d44..d5f5a7d 100644 --- a/src/H5Rdeprec.c +++ b/src/H5Rdeprec.c @@ -449,7 +449,7 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t size_t buf_size = H5R_DSET_REG_REF_BUF_SIZE; /* Retrieve space */ - if (space_id == H5I_BADID) + if (space_id == H5I_INVALID_HID) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "reference region dataspace id must be valid") if (NULL == (space = (struct H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") |