blob: 0613c9386a081b3f328d6c382be1eac1ffb4adf6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstsize_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/09 09:04:28 by cacharle #+# #+# */
/* Updated: 2019/10/09 09:20:36 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdlib.h>
#include "libft.h"
int ft_lstsize(t_list *lst)
{
int counter;
counter = 0;
while (lst != NULL)
{
counter++;
lst = lst->next;
}
return (counter);
}
|