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_stacklast.c
Adam Joly 220751604a asdflkaj
2024-02-12 15:27:29 +01:00

28 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_stacklast.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/06 10:18:01 by adjoly #+# #+# */
/* Updated: 2024/02/08 16:24:36 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "../push_swap.h"
t_stack *ft_stacklast(t_stack *stack)
{
t_stack *tmp;
if (!stack)
return (NULL);
tmp = stack;
while (tmp->next)
tmp = tmp->next;
return (tmp);
}