-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_lstsize_bonus.c
28 lines (25 loc) · 1.04 KB
/
ft_lstsize_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
26
27
28
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstsize_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: abouramd <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/14 19:01:46 by abouramd #+# #+# */
/* Updated: 2022/10/15 16:08:20 by abouramd ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_lstsize(t_list *lst)
{
int count;
t_list *p;
p = lst;
count = 0;
while (p != NULL)
{
p = (*p).next;
count++;
}
return (count);
}