/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lst_size.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/04 11:09:35 by jhalford #+# #+# */ /* Updated: 2016/11/04 11:09:36 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" int ft_lstsize(t_list *lst) { int i; i = 0; if (lst) { i = 1; while (lst->next) { lst = lst->next; i++; } } return (i); }