summaryrefslogtreecommitdiffstats
path: root/src/H5Spoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Spoint.c')
-rw-r--r--src/H5Spoint.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/H5Spoint.c b/src/H5Spoint.c
index d13dd0a..ab40e44 100644
--- a/src/H5Spoint.c
+++ b/src/H5Spoint.c
@@ -15,7 +15,7 @@
* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
* Tuesday, June 16, 1998
*
- * Purpose: Point selection data space I/O functions.
+ * Purpose: Point selection dataspace I/O functions.
*/
#include "H5Smodule.h" /* This source code file is part of the H5S module */
@@ -48,7 +48,7 @@ static int H5S__point_unlim_dim(const H5S_t *space);
static htri_t H5S_point_is_contiguous(const H5S_t *space);
static htri_t H5S_point_is_single(const H5S_t *space);
static htri_t H5S_point_is_regular(const H5S_t *space);
-static herr_t H5S_point_adjust_u(H5S_t *space, const hsize_t *offset);
+static void H5S_point_adjust_u(H5S_t *space, const hsize_t *offset);
static herr_t H5S_point_project_scalar(const H5S_t *space, hsize_t *offset);
static herr_t H5S_point_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
static herr_t H5S_point_iter_init(H5S_sel_iter_t *iter, const H5S_t *space);
@@ -426,7 +426,7 @@ H5S_point_add(H5S_t *space, H5S_seloper_t op, hsize_t num_elem, const hsize_t *c
/* Insert the list of points selected in the proper place */
if(op == H5S_SELECT_SET || op == H5S_SELECT_PREPEND) {
/* Append current list, if there is one */
- if(space->select.sel_info.pnt_lst->head != NULL)
+ if(NULL != space->select.sel_info.pnt_lst->head)
curr->next = space->select.sel_info.pnt_lst->head;
/* Put new list in point selection */
@@ -687,8 +687,8 @@ static htri_t
H5S_point_is_valid (const H5S_t *space)
{
H5S_pnt_node_t *curr; /* Point information nodes */
- unsigned u; /* Counter */
- htri_t ret_value=TRUE; /* return value */
+ unsigned u; /* Counter */
+ htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -742,7 +742,7 @@ H5Sget_select_elem_npoints(hid_t spaceid)
/* Check args */
if(NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
if(H5S_GET_SELECT_TYPE(space) != H5S_SEL_POINTS)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an element selection")
@@ -1192,7 +1192,7 @@ H5Sget_select_elem_pointlist(hid_t spaceid, hsize_t startpoint,
if(NULL == buf)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pointer")
if(NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
if(H5S_GET_SELECT_TYPE(space) != H5S_SEL_POINTS)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a point selection")
@@ -1234,11 +1234,12 @@ H5S_point_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
{
H5S_pnt_node_t *node; /* Point node */
unsigned rank; /* Dataspace rank */
- unsigned u; /* index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
+ /* Sanity check */
HDassert(space);
HDassert(start);
HDassert(end);
@@ -1490,11 +1491,11 @@ H5S_point_is_regular(const H5S_t *space)
PURPOSE
Adjust a "point" selection by subtracting an offset
USAGE
- herr_t H5S_point_adjust_u(space, offset)
+ void H5S_point_adjust_u(space, offset)
H5S_t *space; IN/OUT: Pointer to dataspace to adjust
const hsize_t *offset; IN: Offset to subtract
RETURNS
- Non-negative on success, negative on failure
+ None
DESCRIPTION
Moves a point selection by subtracting an offset from it.
GLOBAL VARIABLES
@@ -1502,7 +1503,7 @@ H5S_point_is_regular(const H5S_t *space)
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-static herr_t
+static void
H5S_point_adjust_u(H5S_t *space, const hsize_t *offset)
{
H5S_pnt_node_t *node; /* Point node */
@@ -1532,7 +1533,7 @@ H5S_point_adjust_u(H5S_t *space, const hsize_t *offset)
node = node->next;
} /* end while */
- FUNC_LEAVE_NOAPI(SUCCEED)
+ FUNC_LEAVE_NOAPI_VOID
} /* H5S_point_adjust_u() */
@@ -1829,7 +1830,7 @@ H5S_point_get_seq_list(const H5S_t *space, unsigned flags, H5S_sel_iter_t *iter,
/* Get the dataspace dimensions */
if((ndims = H5S_get_simple_extent_dims (space, dims, NULL)) < 0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to retrieve data space dimensions")
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to retrieve dataspace dimensions")
/* Walk through the points in the selection, starting at the current */
/* location in the iterator */