/* ************************************************************************** */ /* */ /* ::: o_ :::::: ::: */ /* ft_lstsize.c :+: / :+::+: :+: */ /* +:+ > +:++:+ +:+ */ /* By: whaffman +#+ +:+ +#++#++:++#++ */ /* +#+ +#+#+ +#++#+ +#+ \o/ */ /* Created: 2024/10/10 17:00:21 by whaffman #+#+# #+#+# #+# #+# | */ /* Updated: 2024/10/10 17:00:21 by whaffman ### ### ### ### / \ */ /* */ /* ************************************************************************** */ #include "libft.h" int ft_lstsize(t_list *lst) { int count; count = 1; if (!lst) return (0); while (lst->next) { lst = lst->next; count++; } return (count); }