return 1;
}
-static int rbtree_loop(struct osl_column *col, void *private_data,
+static int rbtree_loop(struct osl_column *col, void *private_data,
osl_rbtree_loop_func *func)
{
struct rb_node *n, *tmp;
n;
n = tmp, tmp = tmp? rb_next(tmp) : NULL) {
struct osl_row *r = get_row_pointer(n, col->rbtree_num);
- int ret = func(r, private_data);
- if (ret < 0)
- return ret;
+ if (func(r, private_data) < 0)
+ return -E_OSL_LOOP;
}
return 1;
}
-static int rbtree_loop_reverse(struct osl_column *col, void *private_data,
+static int rbtree_loop_reverse(struct osl_column *col, void *private_data,
osl_rbtree_loop_func *func)
{
struct rb_node *n, *tmp;
n;
n = tmp, tmp = tmp? rb_prev(tmp) : NULL) {
struct osl_row *r = get_row_pointer(n, col->rbtree_num);
- int ret = func(r, private_data);
- if (ret < 0)
- return ret;
+ if (func(r, private_data) < 0)
+ return -E_OSL_LOOP;
}
return 1;
}
*
*
* \return Standard. If the termination of the loop was caused by \a func
- * returning a negative value, this value is returned.
+ * returning a negative value, \p -E_OSL_LOOP is returned.
*
* \sa osl_storage_flags, osl_rbtree_loop_reverse(), osl_compare_func.
*/