-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_dlstlast.c
More file actions
24 lines (21 loc) · 1.09 KB
/
ft_dlstlast.c
File metadata and controls
24 lines (21 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_dlstlast.c :+: :+: */
/* +:+ */
/* By: jaberkro <jaberkro@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2022/03/21 21:00:31 by jaberkro #+# #+# */
/* Updated: 2022/04/14 12:26:28 by jaberkro ######## odam.nl */
/* */
/* ************************************************************************** */
#include "libft.h"
t_dlist *ft_dlstlast(t_dlist *dlst)
{
if (!dlst)
return (0);
while (dlst->next != NULL)
dlst = dlst->next;
return (dlst);
}
/* Returns a pointer to the last element in the doubly linked list */