summaryrefslogtreecommitdiffstats
path: root/src/H5R.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2018-09-20 20:38:40 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2018-09-20 20:38:40 (GMT)
commitb48686febd832aefbc44274bff9e0408bbc84aa0 (patch)
tree9a87b3180324c98415b0b1973dbff497f1535b9c /src/H5R.c
parent67a126c7ba8825ffb193c930c7b8cae939b3446d (diff)
downloadhdf5-b48686febd832aefbc44274bff9e0408bbc84aa0.zip
hdf5-b48686febd832aefbc44274bff9e0408bbc84aa0.tar.gz
hdf5-b48686febd832aefbc44274bff9e0408bbc84aa0.tar.bz2
Normalization with vol_integration (misc internal and datatype)
Diffstat (limited to 'src/H5R.c')
-rw-r--r--src/H5R.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/H5R.c b/src/H5R.c
index 95abc32..65aa6cb 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -93,7 +93,7 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t
{
H5G_loc_t loc; /* File location */
H5S_t *space = NULL; /* Pointer to dataspace containing region */
- herr_t ret_value; /* Return value */
+ herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE5("e", "*xi*sRti", ref, loc_id, name, ref_type, space_id);
@@ -101,17 +101,17 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t
/* Check args */
if (ref == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer")
- if (H5G_loc(loc_id, &loc) < 0)
+ if(H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if (!name || !*name)
+ if(!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given")
- if (ref_type <= H5R_BADTYPE || ref_type >= H5R_MAXTYPE)
+ if(ref_type <= H5R_BADTYPE || ref_type >= H5R_MAXTYPE)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference type")
- if (ref_type != H5R_OBJECT && ref_type != H5R_DATASET_REGION)
+ if(ref_type != H5R_OBJECT && ref_type != H5R_DATASET_REGION)
HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "reference type not supported")
- if (space_id == (-1) && ref_type == H5R_DATASET_REGION)
+ if(space_id == (-1) && ref_type == H5R_DATASET_REGION)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "reference region dataspace id must be valid")
- if (space_id != (-1) && (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))))
+ if(space_id != (-1) && (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
/* Set up collective metadata if appropriate */
@@ -165,13 +165,13 @@ H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *_r
H5TRACE4("i", "iiRt*x", obj_id, oapl_id, ref_type, _ref);
/* Check args */
- if (H5G_loc(obj_id, &loc) < 0)
+ if(H5G_loc(obj_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a location")
- if (oapl_id < 0)
+ if(oapl_id < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list")
- if (ref_type <= H5R_BADTYPE || ref_type >= H5R_MAXTYPE)
+ if(ref_type <= H5R_BADTYPE || ref_type >= H5R_MAXTYPE)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference type")
- if (_ref == NULL)
+ if(_ref == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference pointer")
/* Verify access property list and set up collective metadata if appropriate */
@@ -181,7 +181,7 @@ H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *_r
/* Get the file pointer from the entry */
file = loc.oloc->file;
- /* Create reference */
+ /* Dereference */
if((ret_value = H5R__dereference(file, oapl_id, ref_type, _ref)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to dereference object")
@@ -224,11 +224,11 @@ H5Rget_region(hid_t id, H5R_type_t ref_type, const void *ref)
H5TRACE3("i", "iRt*x", id, ref_type, ref);
/* Check args */
- if (H5G_loc(id, &loc) < 0)
+ if(H5G_loc(id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a location")
- if (ref_type != H5R_DATASET_REGION)
+ if(ref_type != H5R_DATASET_REGION)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference type")
- if (ref == NULL)
+ if(ref == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid reference pointer")
/* Get the dataspace with the correct region selected */
@@ -236,7 +236,7 @@ H5Rget_region(hid_t id, H5R_type_t ref_type, const void *ref)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to retrieve dataspace")
/* Atomize */
- if ((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0)
+ if((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace atom")
done:
@@ -278,14 +278,14 @@ H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *ref,
H5TRACE4("e", "iRt*x*Ot", id, ref_type, ref, obj_type);
/* Check args */
- if (H5G_loc(id, &loc) < 0)
+ if(H5G_loc(id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
- if (ref_type <= H5R_BADTYPE || ref_type >= H5R_MAXTYPE)
+ if(ref_type <= H5R_BADTYPE || ref_type >= H5R_MAXTYPE)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference type")
- if (ref == NULL)
+ if(ref == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer")
- /* Get the object information */
+ /* Get the object type */
if(H5R__get_obj_type(loc.oloc->file, ref_type, ref, obj_type) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to determine object type")
@@ -333,17 +333,17 @@ H5Rget_name(hid_t id, H5R_type_t ref_type, const void *_ref, char *name,
{
H5G_loc_t loc; /* Group location */
H5F_t *file; /* File object */
- ssize_t ret_value; /* Return value */
+ ssize_t ret_value = -1; /* Return value */
FUNC_ENTER_API((-1))
H5TRACE5("Zs", "iRt*x*sz", id, ref_type, _ref, name, size);
/* Check args */
- if (H5G_loc(id, &loc) < 0)
+ if(H5G_loc(id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not a location")
- if (ref_type <= H5R_BADTYPE || ref_type >= H5R_MAXTYPE)
+ if(ref_type <= H5R_BADTYPE || ref_type >= H5R_MAXTYPE)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid reference type")
- if (_ref == NULL)
+ if(_ref == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid reference pointer")
/* Get the file pointer from the entry */