remove recurssive function + commented main

This commit is contained in:
David Gailleton
2025-11-11 13:49:56 +01:00
parent c4e4c7c141
commit c722e2b87d
18 changed files with 93 additions and 140 deletions

View File

@@ -6,7 +6,7 @@
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/11/09 14:43:22 by dgaillet #+# #+# */
/* Updated: 2025/11/10 18:19:33 by dgaillet ### ########lyon.fr */
/* Updated: 2025/11/11 11:31:23 by dgaillet ### ########lyon.fr */
/* */
/* ************************************************************************** */
@@ -14,14 +14,18 @@
int ft_lstsize(t_list *lst)
{
int i;
int i;
t_list *first_node;
if (!lst)
return (0);
first_node = lst;
i = 1;
while (lst->next)
{
lst = lst->next;
if (lst == first_node)
break ;
i++;
}
return (i);