Remove noob code.
This commit is contained in:
parent
6c5970da62
commit
e59d089b45
12
lib/stack.c
12
lib/stack.c
@ -31,13 +31,11 @@ void initialize_stack(struct stack *stack) {
|
|||||||
void delete_stack(struct stack *stack) {
|
void delete_stack(struct stack *stack) {
|
||||||
struct stack *tmp_stack;
|
struct stack *tmp_stack;
|
||||||
|
|
||||||
if (stack) {
|
while (stack) {
|
||||||
while (stack) {
|
tmp_stack = stack->next;
|
||||||
tmp_stack = stack->next;
|
delete_card(stack->card);
|
||||||
delete_card(stack->card);
|
free(stack);
|
||||||
free(stack);
|
stack = tmp_stack;
|
||||||
stack = tmp_stack;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user