Archived
1
0
This repository has been archived on 2024-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
push_swap/stack/ft_stackclear.c

27 lines
1.1 KiB
C
Raw Normal View History

2024-02-12 15:27:29 +01:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_stackclear.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/04 18:54:56 by adjoly #+# #+# */
2024-02-22 13:38:34 +01:00
/* Updated: 2024/02/22 13:32:09 by adjoly ### ########.fr */
2024-02-12 15:27:29 +01:00
/* */
/* ************************************************************************** */
#include "../push_swap.h"
void ft_stackclear(t_stack **stack)
{
t_stack *tmp;
tmp = NULL;
while (stack && *stack)
{
tmp = (*stack)->next;
ft_stackdelone(*stack);
*stack = tmp;
}
}