mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
do_pop_dom_node(): move dom_stack_has_parents() to assertion
All callers already checks if the stack is empty.
This commit is contained in:
parent
9bc71ec8a9
commit
bc338207e7
@ -137,8 +137,7 @@ do_pop_dom_node(struct dom_stack *stack, struct dom_stack_state *parent)
|
|||||||
struct dom_stack_state *state;
|
struct dom_stack_state *state;
|
||||||
dom_stack_callback_T callback;
|
dom_stack_callback_T callback;
|
||||||
|
|
||||||
assert(stack);
|
assert(stack && dom_stack_has_parents(stack));
|
||||||
if (!dom_stack_has_parents(stack)) return 0;
|
|
||||||
|
|
||||||
state = get_dom_stack_top(stack);
|
state = get_dom_stack_top(stack);
|
||||||
callback = stack->pop_callbacks[state->node->type];
|
callback = stack->pop_callbacks[state->node->type];
|
||||||
|
Loading…
Reference in New Issue
Block a user