/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lstsize_bonus.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/10/09 09:04:28 by cacharle #+# #+# */ /* Updated: 2019/11/20 04:01:44 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" int ft_lstsize(t_list *lst) { int counter; counter = 0; while (lst != NULL) { counter++; lst = lst->next; } return (counter); }