ssl_des/lib/libft/ft_lst_len.c

27 lines
1 KiB
C
Raw Normal View History

2018-10-07 19:34:39 +03:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lst_len.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gtertysh <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/04 19:13:25 by gtertysh #+# #+# */
/* Updated: 2017/03/24 20:06:06 by gtertysh ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_lst_len(t_list *lst)
{
int len;
len = 0;
while (lst)
{
lst = lst->next;
len++;
}
return (len);
}