-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_list_size.c
28 lines (25 loc) · 1.06 KB
/
ft_list_size.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
28
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_list_size.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: igarbuz <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/11/18 22:28:28 by igarbuz #+# #+# */
/* Updated: 2018/11/18 22:38:09 by igarbuz ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_list_size(t_list *begin_list)
{
int i;
if (!begin_list)
return (0);
i = 0;
while (begin_list)
{
begin_list = begin_list->next;
i++;
}
return (i);
}