Skip to content

Commit

Permalink
[stack] Fix clear function with dtor
Browse files Browse the repository at this point in the history
Small logic fix
  • Loading branch information
randoragon committed Aug 15, 2021
1 parent 0343e07 commit bf4547e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/rnd_stack.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,8 @@ int rnd_stack_clear(struct rnd_stack *stack, int (*dtor)(void*))
}
p += stack->elem_size;
}
} else {
stack->size = 0;
}
stack->size = 0;
return 0;
}

Expand Down

0 comments on commit bf4547e

Please sign in to comment.