return b_end;
}
-static inline bool mas_node_walk(struct ma_state *mas, enum maple_type type,
+static inline void mas_node_walk(struct ma_state *mas, enum maple_type type,
unsigned long *range_min, unsigned long *range_max);
/*
/* The node may not contain the value so set slot to ensure all
* of the nodes contents are freed or destroyed.
*/
- if (!mas_node_walk(mast->orig_r,
- mte_node_type(mast->orig_r->node),
- &range_min, &range_max)) {
+ if (mast->orig_r->max < mast->orig_r->last)
mast->orig_r->offset = mas_data_end(mast->orig_r) + 1;
- }
+ else
+ mas_node_walk(mast->orig_r, mte_node_type(mast->orig_r->node),
+ &range_min, &range_max);
/* Set up the left side of things */
mast->orig_l->offset = 0;
mast->orig_l->index = mast->l->min;
return true;
}
-static inline bool mas_node_walk(struct ma_state *mas, enum maple_type type,
+static inline void mas_node_walk(struct ma_state *mas, enum maple_type type,
unsigned long *range_min, unsigned long *range_max)
{
unsigned long *pivots = ma_pivots(mas_mn(mas), type);
dense:
*range_min = min;
*range_max = pivot;
- return true;
}
/*
mas->depth++;
type = mte_node_type(mas->node);
- if (unlikely(!mas_node_walk(mas, type, range_min, range_max)))
- return false;
-
+ mas_node_walk(mas, type, range_min, range_max);
if (ma_is_leaf(type)) // Leaf.
return true;