lstiter reparee fonction sapplique sur content
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2019/11/25 14:14:11 by hulamy #+# #+# */
|
||||
/* Updated: 2019/11/28 17:20:38 by hulamy ### ########.fr */
|
||||
/* Updated: 2019/11/29 16:27:05 by hulamy ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -75,12 +75,11 @@
|
||||
|
||||
void ft_lstiter(t_list *lst, void (*f)(void *))
|
||||
{
|
||||
if (lst && f)
|
||||
if (!f)
|
||||
return;
|
||||
while (lst)
|
||||
{
|
||||
while (lst)
|
||||
{
|
||||
f(lst);
|
||||
lst = lst->next;
|
||||
}
|
||||
f(lst->content);
|
||||
lst = lst->next;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user