aboutsummaryrefslogtreecommitdiff
path: root/src/lst/ft_lstpop_front.c
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-01-15 14:16:36 +0100
committerCharles <sircharlesaze@gmail.com>2020-01-15 14:16:36 +0100
commite8a7d07f1c99b5ce6210603d88098580af95fb13 (patch)
treecd442d7e351c20bcc6a6dc9f0b4619100750932a /src/lst/ft_lstpop_front.c
parent496afe8e8a82d6db730bf835eb5fbe1ef3a142be (diff)
downloadlibft-e8a7d07f1c99b5ce6210603d88098580af95fb13.tar.gz
libft-e8a7d07f1c99b5ce6210603d88098580af95fb13.tar.bz2
libft-e8a7d07f1c99b5ce6210603d88098580af95fb13.zip
Fix strtol, Added list reverse functions
Diffstat (limited to 'src/lst/ft_lstpop_front.c')
-rw-r--r--src/lst/ft_lstpop_front.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lst/ft_lstpop_front.c b/src/lst/ft_lstpop_front.c
index f81315a..f59c9b8 100644
--- a/src/lst/ft_lstpop_front.c
+++ b/src/lst/ft_lstpop_front.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/25 03:32:51 by cacharle #+# #+# */
-/* Updated: 2019/10/25 03:35:58 by cacharle ### ########.fr */
+/* Updated: 2020/01/15 12:46:28 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -20,7 +20,6 @@ void ft_lstpop_front(t_list **lst, void (*del)(void *))
if (lst == NULL || *lst == NULL)
return ;
tmp = (*lst)->next;
- del((*lst)->content);
- free(*lst);
+ ft_lstdelone(*lst, del);
*lst = tmp;
}