libft
Loading...
Searching...
No Matches
ft_lstdelone.c
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* ft_lstdelone_bonus.c :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: tspoof <tspoof@student.hive.fi> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2022/11/07 13:50:25 by tspoof #+# #+# */
9/* Updated: 2022/11/16 13:01:57 by tspoof ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#include "libft.h"
14
15void ft_lstdelone(t_list *lst, void (*del)(void *))
16{
17 if (!lst || !del)
18 return ;
19 del(lst->content);
20 free(lst);
21}
void ft_lstdelone(t_list *lst, void(*del)(void *))
Delete node.
Definition libft.h:22
void * content
Definition libft.h:23