-
Notifications
You must be signed in to change notification settings - Fork 2
/
ft_lstsize.c
23 lines (20 loc) · 1021 Bytes
/
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstsize.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hbaddrul <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/05/08 01:20:53 by hbaddrul #+# #+# */
/* Updated: 2021/07/30 16:30:00 by hbaddrul ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_lstsize(t_list *lst)
{
int ret;
ret = 0;
while (lst && ++ret)
lst = lst->next;
return (ret);
}