correction erreurs dans lstclear et lstdelone

This commit is contained in:
Hugo LAMY
2019-11-21 16:31:20 +01:00
parent a3c44c565c
commit e240d38318
4 changed files with 3 additions and 10 deletions

BIN
srcs/bonus/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -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");

View File

@@ -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);
** }