diff --git a/srcs/bonus/.DS_Store b/srcs/bonus/.DS_Store new file mode 100644 index 0000000..c490291 Binary files /dev/null and b/srcs/bonus/.DS_Store differ diff --git a/srcs/bonus/a.out b/srcs/bonus/a.out index dfd0707..0c2e457 100755 Binary files a/srcs/bonus/a.out and b/srcs/bonus/a.out differ diff --git a/srcs/bonus/ft_lstclear.c b/srcs/bonus/ft_lstclear.c index f72b4d6..5106fd7 100644 --- a/srcs/bonus/ft_lstclear.c +++ b/srcs/bonus/ft_lstclear.c @@ -34,11 +34,7 @@ ** if (!content) ** lst->content = NULL; ** else -** { -** if (!(lst->content = malloc(sizeof(content)))) -** return (NULL); -** ft_memcpy(lst->content, content, sizeof(content)); -** } +** lst->content = content; ** lst->next = NULL; ** return (lst); ** } @@ -81,6 +77,7 @@ ** t_list *toto; ** void (ft_delete)(void*); ** +** printf("sizeof(t_list)%lu\n",sizeof(t_list)); ** toto = ft_lstnew("a"); ** toto->next = ft_lstnew("b"); ** toto->next->next = ft_lstnew("c"); diff --git a/srcs/bonus/ft_lstdelone.c b/srcs/bonus/ft_lstdelone.c index 8cca4a8..b18ef54 100644 --- a/srcs/bonus/ft_lstdelone.c +++ b/srcs/bonus/ft_lstdelone.c @@ -35,11 +35,7 @@ ** if (!content) ** lst->content = NULL; ** else -** { -** if (!(lst->content = malloc(sizeof(content)))) -** return (NULL); -** ft_memcpy(lst->content, content, sizeof(content)); -** } +** lst->content = content; ** lst->next = NULL; ** return (lst); ** }