-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_lstlast_bonus.c
25 lines (22 loc) · 1.06 KB
/
ft_lstlast_bonus.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstlast_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dpaluszk <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/16 08:24:30 by dpaluszk #+# #+# */
/* Updated: 2024/03/20 16:54:50 by dpaluszk ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_list *ft_lstlast(t_list *lst)
{
t_list *final;
final = lst;
if (final == NULL)
return (NULL);
while (final->next != NULL)
final = final->next;
return (final);
}