summaryrefslogtreecommitdiffstats
path: root/src/H5R.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2011-08-10 16:14:05 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2011-08-10 16:14:05 (GMT)
commitdb9b025d8554b47b295783715a8f7d2b1674d511 (patch)
treed5df4acc4b40e78fdb3937cefaa9f706f9c4c05e /src/H5R.c
parentfe3dbaa0e6d27e4a9b81304ae589982b57b5f0d7 (diff)
downloadhdf5-db9b025d8554b47b295783715a8f7d2b1674d511.zip
hdf5-db9b025d8554b47b295783715a8f7d2b1674d511.tar.gz
hdf5-db9b025d8554b47b295783715a8f7d2b1674d511.tar.bz2
[svn-r21205] Issue 2763 - adding OAPL_ID as a new parameter to H5Rdereference. I added a check of OAPL_ID against -1 because CMAKE
on 64-bit Windows slipped through the function call in the trefer.c test. Tested on jam and CMAKE on 64-bit Windows.
Diffstat (limited to 'src/H5R.c')
-rw-r--r--src/H5R.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/H5R.c b/src/H5R.c
index 68ddc91..aa5ad36 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -502,6 +502,7 @@ done:
hid_t H5Rdereference2(ref)
hid_t id; IN: Dataset reference object is in or location ID of
object that the dataset is located within.
+ hid_t oapl_id; IN: Property list of the object being referenced.
H5R_type_t ref_type; IN: Type of reference to create
void *ref; IN: Reference to open.
@@ -532,6 +533,8 @@ H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *_r
/* Check args */
if(H5G_loc(obj_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if(oapl_id < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
if(ref_type <= H5R_BADTYPE || ref_type >= H5R_MAXTYPE)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference type")
if(_ref == NULL)