libft/list/ft_lstdelone.c
Raphael 905ffd4b72
refactor: only the usefull header
- Removing all 'libft.h' mention
- Using the include only on the files needed by
2025-09-01 18:45:33 +02:00

26 lines
1.2 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstdelone.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/12 11:42:11 by rparodi #+# #+# */
/* Updated: 2025/09/01 16:36:07 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "list.h"
#include <stdlib.h>
/**
* @brief Clear the element of the list with the function
*
* @param lst the element of the list to be clear
* @param del the function to clear the list
*/
void ft_lstdelone(t_list *lst, void (*del)(void *))
{
del(lst->content);
free(lst);
}