Automatic add
This commit is contained in:
parent
49509b056d
commit
17650ddb92
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: tosuman <timo42@proton.me> +#+ +:+ +#+ */
|
/* By: tosuman <timo42@proton.me> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/06/24 17:10:04 by tosuman #+# #+# */
|
/* Created: 2023/06/24 17:10:04 by tosuman #+# #+# */
|
||||||
/* Updated: 2023/06/26 20:32:34 by tosuman ### ########.fr */
|
/* Updated: 2023/06/30 00:57:49 by tischmid ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -23,7 +23,7 @@ t_list *ft_lstmap(t_list *lst, void *(*f)(void *), void (*del)(void *))
|
||||||
new_lst = (void *)0;
|
new_lst = (void *)0;
|
||||||
while (lst)
|
while (lst)
|
||||||
{
|
{
|
||||||
new_elem = ft_lstnew(f(lst->content));
|
new_elem = ft_lstnew(f(lst->content)); // maybe check for NULL
|
||||||
if (!new_elem)
|
if (!new_elem)
|
||||||
{
|
{
|
||||||
while (new_lst)
|
while (new_lst)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue