correction erreurs dans lstclear et lstdelone
This commit is contained in:
BIN
srcs/bonus/.DS_Store
vendored
Normal file
BIN
srcs/bonus/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
srcs/bonus/a.out
BIN
srcs/bonus/a.out
Binary file not shown.
@@ -34,11 +34,7 @@
|
|||||||
** if (!content)
|
** if (!content)
|
||||||
** lst->content = NULL;
|
** lst->content = NULL;
|
||||||
** else
|
** else
|
||||||
** {
|
** lst->content = content;
|
||||||
** if (!(lst->content = malloc(sizeof(content))))
|
|
||||||
** return (NULL);
|
|
||||||
** ft_memcpy(lst->content, content, sizeof(content));
|
|
||||||
** }
|
|
||||||
** lst->next = NULL;
|
** lst->next = NULL;
|
||||||
** return (lst);
|
** return (lst);
|
||||||
** }
|
** }
|
||||||
@@ -81,6 +77,7 @@
|
|||||||
** t_list *toto;
|
** t_list *toto;
|
||||||
** void (ft_delete)(void*);
|
** void (ft_delete)(void*);
|
||||||
**
|
**
|
||||||
|
** printf("sizeof(t_list)%lu\n",sizeof(t_list));
|
||||||
** toto = ft_lstnew("a");
|
** toto = ft_lstnew("a");
|
||||||
** toto->next = ft_lstnew("b");
|
** toto->next = ft_lstnew("b");
|
||||||
** toto->next->next = ft_lstnew("c");
|
** toto->next->next = ft_lstnew("c");
|
||||||
|
|||||||
@@ -35,11 +35,7 @@
|
|||||||
** if (!content)
|
** if (!content)
|
||||||
** lst->content = NULL;
|
** lst->content = NULL;
|
||||||
** else
|
** else
|
||||||
** {
|
** lst->content = content;
|
||||||
** if (!(lst->content = malloc(sizeof(content))))
|
|
||||||
** return (NULL);
|
|
||||||
** ft_memcpy(lst->content, content, sizeof(content));
|
|
||||||
** }
|
|
||||||
** lst->next = NULL;
|
** lst->next = NULL;
|
||||||
** return (lst);
|
** return (lst);
|
||||||
** }
|
** }
|
||||||
|
|||||||
Reference in New Issue
Block a user