tgrekov-libft
HIVE libft Oct 2023
Loading...
Searching...
No Matches
ft_lstdelone_bonus.c
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* ft_lstdelone_bonus.c :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2023/10/28 01:31:35 by tgrekov #+# #+# */
9/* Updated: 2023/11/20 19:21:44 by tgrekov ### ########.fr */
10/* */
11/* ************************************************************************** */
12
20#include "libft.h"
21
29void ft_lstdelone(t_list *lst, void (*del)(void *))
30{
31 if (!lst)
32 return ;
33 if (del)
34 del(lst->content);
35 free(lst);
36}
void ft_lstdelone(t_list *lst, void(*del)(void *))
Delete a node and it's content.
Linked list node.
Definition libft.h:44
void * content
void* to the node's contents.
Definition libft.h:45