/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lstsize_bonus.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: narnaud +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2021/10/22 14:49:32 by narnaud #+# #+# */ /* Updated: 2021/11/15 13:06:39 by narnaud ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" int ft_lstsize(t_list *lst) { size_t lst_size; lst_size = 0; while (lst && ++lst_size) lst = lst->next; return (lst_size); }