aboutsummaryrefslogtreecommitdiff
path: root/src/lst/ft_lstdestroy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lst/ft_lstdestroy.c')
-rw-r--r--src/lst/ft_lstdestroy.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lst/ft_lstdestroy.c b/src/lst/ft_lstdestroy.c
index 35da2a5..2af6fb7 100644
--- a/src/lst/ft_lstdestroy.c
+++ b/src/lst/ft_lstdestroy.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/09 09:02:39 by cacharle #+# #+# */
-/* Updated: 2019/11/20 04:02:37 by cacharle ### ########.fr */
+/* Updated: 2020/08/20 14:36:17 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -15,15 +15,17 @@
/*
** \brief Destroy a list and set his pointer to NULL
** \param del Delete Function for data of each node
+** \return returns NULL
*/
-void ft_lstdestroy(t_ftlst **lst, void (*del)(void *))
+void *ft_lstdestroy(t_ftlst **lst, void (*del)(void *))
{
if (lst == NULL)
- return ;
+ return (NULL);
if (*lst == NULL)
- return ;
+ return (NULL);
ft_lstdestroy(&((*lst)->next), del);
ft_lstdelone(*lst, del);
*lst = NULL;
+ return (NULL);
}