summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Henderson <jhenderson@hdfgroup.org>2019-09-16 16:34:00 (GMT)
committerJordan Henderson <jhenderson@hdfgroup.org>2019-09-16 16:34:00 (GMT)
commit72e8387bc9421de3af291c6b7d7df6c0d1fc4ec0 (patch)
treeb758457df1421d2fd4d1dd1d2d38e1b9d5d9e034
parentcafab483ff373731e694096a9cdfdf262ed7cf5f (diff)
parent0de0965c61823186ac61c0d6876d4d77578e5bcc (diff)
downloadhdf5-72e8387bc9421de3af291c6b7d7df6c0d1fc4ec0.zip
hdf5-72e8387bc9421de3af291c6b7d7df6c0d1fc4ec0.tar.gz
hdf5-72e8387bc9421de3af291c6b7d7df6c0d1fc4ec0.tar.bz2
Merge pull request #1887 in HDFFV/hdf5 from ~JHENDERSON/hdf5:develop to develop
* commit '0de0965c61823186ac61c0d6876d4d77578e5bcc': Fix issue in H5Lcreate_hard and H5Olink where entire H5VL_loc_params_t structure was passed via varargs
-rw-r--r--src/H5L.c2
-rw-r--r--src/H5O.c2
-rw-r--r--src/H5VLnative_link.c8
3 files changed, 6 insertions, 6 deletions
diff --git a/src/H5L.c b/src/H5L.c
index 98976a6..24836d2 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -578,7 +578,7 @@ H5Lcreate_hard(hid_t cur_loc_id, const char *cur_name,
tmp_vol_obj.connector = (vol_obj1 != NULL ? vol_obj1->connector : vol_obj2->connector);
/* Create the link */
- if(H5VL_link_create(H5VL_LINK_CREATE_HARD, &tmp_vol_obj, &loc_params2, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, (vol_obj1 ? vol_obj1->data : NULL), loc_params1) < 0)
+ if(H5VL_link_create(H5VL_LINK_CREATE_HARD, &tmp_vol_obj, &loc_params2, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, (vol_obj1 ? vol_obj1->data : NULL), &loc_params1) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to create hard link")
done:
diff --git a/src/H5O.c b/src/H5O.c
index e7351fc..bf2d799 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -367,7 +367,7 @@ H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id,
tmp_vol_obj.connector = (vol_obj1 != NULL ? vol_obj1->connector : vol_obj2->connector);
/* Create a link to the object */
- if(H5VL_link_create(H5VL_LINK_CREATE_HARD, &tmp_vol_obj, &loc_params2, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, vol_obj1->data, loc_params1) < 0)
+ if(H5VL_link_create(H5VL_LINK_CREATE_HARD, &tmp_vol_obj, &loc_params2, lcpl_id, lapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, vol_obj1->data, &loc_params1) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "unable to create link")
done:
diff --git a/src/H5VLnative_link.c b/src/H5VLnative_link.c
index 4709eb3..5d5935d 100644
--- a/src/H5VLnative_link.c
+++ b/src/H5VLnative_link.c
@@ -58,15 +58,15 @@ H5VL__native_link_create(H5VL_link_create_type_t create_type, void *obj,
H5G_loc_t cur_loc;
H5G_loc_t link_loc;
void *cur_obj = HDva_arg(arguments, void *);
- H5VL_loc_params_t cur_params = HDva_arg(arguments, H5VL_loc_params_t);
+ H5VL_loc_params_t *cur_params = HDva_arg(arguments, H5VL_loc_params_t *);
- if(NULL != cur_obj && H5G_loc_real(cur_obj, cur_params.obj_type, &cur_loc) < 0)
+ if(NULL != cur_obj && H5G_loc_real(cur_obj, cur_params->obj_type, &cur_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object")
if(NULL != obj && H5G_loc_real(obj, loc_params->obj_type, &link_loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object")
/* H5Lcreate_hard */
- if(H5VL_OBJECT_BY_NAME == cur_params.type) {
+ if(H5VL_OBJECT_BY_NAME == cur_params->type) {
H5G_loc_t *cur_loc_p, *link_loc_p;
/* Set up current & new location pointers */
@@ -80,7 +80,7 @@ H5VL__native_link_create(H5VL_link_create_type_t create_type, void *obj,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "source and destination should be in the same file.")
/* Create the link */
- if((ret_value = H5L_create_hard(cur_loc_p, cur_params.loc_data.loc_by_name.name,
+ if((ret_value = H5L_create_hard(cur_loc_p, cur_params->loc_data.loc_by_name.name,
link_loc_p, loc_params->loc_data.loc_by_name.name, lcpl_id)) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
} /* end if */