From e59d089b4599e78e12888c4755aa8e6eded5ac28 Mon Sep 17 00:00:00 2001 From: Murilo Pereira Date: Mon, 14 Feb 2011 00:05:54 -0200 Subject: [PATCH] Remove noob code. --- lib/stack.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/stack.c b/lib/stack.c index 88e3693..2394215 100644 --- a/lib/stack.c +++ b/lib/stack.c @@ -31,13 +31,11 @@ void initialize_stack(struct stack *stack) { void delete_stack(struct stack *stack) { struct stack *tmp_stack; - if (stack) { - while (stack) { - tmp_stack = stack->next; - delete_card(stack->card); - free(stack); - stack = tmp_stack; - } + while (stack) { + tmp_stack = stack->next; + delete_card(stack->card); + free(stack); + stack = tmp_stack; } return;