summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5EA.c17
-rw-r--r--src/H5FA.c17
2 files changed, 22 insertions, 12 deletions
diff --git a/src/H5EA.c b/src/H5EA.c
index f3a7d9e..0b340a7 100644
--- a/src/H5EA.c
+++ b/src/H5EA.c
@@ -986,20 +986,25 @@ END_FUNC(PRIV) /* end H5EA_delete() */
* Purpose: Iterate over the elements of an extensible array
* (copied and modified from FA_iterate() in H5FA.c)
*
- * Return: SUCCEED/FAIL
+ * Return: H5_ITER_CONT/H5_ITER_ERROR
*
* Programmer: Vailin Choi; Feb 2015
*
+ * Modification:
+ * Prototype changed (HDFFV-10661)
+ * - herr_t to int
+ * - SUCCEED/FAIL to H5_ITER_CONT/H5_ITER_ERROR
+ * December 24, 2018 -BMR
*-------------------------------------------------------------------------
*/
BEGIN_FUNC(PRIV, ERR,
-herr_t, SUCCEED, FAIL,
+int, H5_ITER_CONT, H5_ITER_ERROR,
H5EA_iterate(H5EA_t *ea, H5EA_operator_t op, void *udata))
/* Local variables */
uint8_t *elmt = NULL;
hsize_t u;
- int ret_value = H5_ITER_CONT; /* Return value from callback */
+ int cb_ret = H5_ITER_CONT; /* Return value from callback */
/* Check arguments */
HDassert(ea);
@@ -1011,15 +1016,15 @@ H5EA_iterate(H5EA_t *ea, H5EA_operator_t op, void *udata))
H5E_THROW(H5E_CANTALLOC, "memory allocation failed for extensible array element")
/* Iterate over all elements in array */
- for(u = 0; u < ea->hdr->stats.stored.max_idx_set && ret_value == H5_ITER_CONT; u++) {
+ for(u = 0; u < ea->hdr->stats.stored.max_idx_set && cb_ret == H5_ITER_CONT; u++) {
/* Get array element */
if(H5EA_get(ea, u, elmt) < 0)
H5E_THROW(H5E_CANTGET, "unable to delete fixed array")
/* Make callback */
- if((ret_value = (*op)(u, elmt, udata)) < 0) {
+ if((cb_ret = (*op)(u, elmt, udata)) < 0) {
H5E_PRINTF(H5E_BADITER, "iterator function failed");
- H5_LEAVE(ret_value)
+ H5_LEAVE(cb_ret)
} /* end if */
} /* end for */
diff --git a/src/H5FA.c b/src/H5FA.c
index 7a3f655..e579e4f 100644
--- a/src/H5FA.c
+++ b/src/H5FA.c
@@ -685,21 +685,26 @@ END_FUNC(PRIV) /* end H5FA_delete() */
* Note: This is not very efficient, we should be iterating directly
* over the fixed array's direct block [pages].
*
- * Return: SUCCEED/FAIL
+ * Return: H5_ITER_CONT/H5_ITER_ERROR
*
* Programmer: Vailin Choi
* Thursday, April 30, 2009
*
+ * Modification:
+ * Prototype changed (HDFFV-10661)
+ * - herr_t to int
+ * - SUCCEED/FAIL to H5_ITER_CONT/H5_ITER_ERROR
+ * December 24, 2018 -BMR
*-------------------------------------------------------------------------
*/
BEGIN_FUNC(PRIV, ERR,
-herr_t, SUCCEED, FAIL,
+int, H5_ITER_CONT, H5_ITER_ERROR,
H5FA_iterate(H5FA_t *fa, H5FA_operator_t op, void *udata))
/* Local variables */
uint8_t *elmt = NULL;
hsize_t u;
- int ret_value = H5_ITER_CONT; /* Return value from callback */
+ int cb_ret = H5_ITER_CONT; /* Return value from callback */
/*
* Check arguments.
@@ -713,15 +718,15 @@ H5FA_iterate(H5FA_t *fa, H5FA_operator_t op, void *udata))
H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array element")
/* Iterate over all elements in array */
- for(u = 0; u < fa->hdr->stats.nelmts && ret_value == H5_ITER_CONT; u++) {
+ for(u = 0; u < fa->hdr->stats.nelmts && cb_ret == H5_ITER_CONT; u++) {
/* Get array element */
if(H5FA_get(fa, u, elmt) < 0)
H5E_THROW(H5E_CANTGET, "unable to delete fixed array")
/* Make callback */
- if((ret_value = (*op)(u, elmt, udata)) < 0) {
+ if((cb_ret = (*op)(u, elmt, udata)) < 0) {
H5E_PRINTF(H5E_BADITER, "iterator function failed");
- H5_LEAVE(ret_value)
+ H5_LEAVE(cb_ret)
} /* end if */
} /* end for */