-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_lstsize.c
27 lines (24 loc) · 1.09 KB
/
ft_lstsize.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
26
27
/* ************************************************************************** */
/* LE - / */
/* / */
/* ft_lstsize.c .:: .:/ . .:: */
/* +:+:+ +: +: +:+:+ */
/* By: davfelix <[email protected]> +:+ +: +: +:+ */
/* #+# #+ #+ #+# */
/* Created: 2018/11/06 16:33:42 by davfelix #+# ## ## #+# */
/* Updated: 2018/11/21 16:06:54 by davfelix ### #+. /#+ ###.fr */
/* / */
/* / */
/* ************************************************************************** */
#include "libft.h"
int ft_lstsize(t_list *lst)
{
int i;
i = 1;
while (lst->next != NULL)
{
lst = lst->next;
i++;
}
return (i);
}