minishell/libft/libft/ft_lstadd_front_bonus.c
2025-02-12 15:12:42 +01:00

21 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstadd_front_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jguelen <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/21 13:14:18 by jguelen #+# #+# */
/* Updated: 2024/10/23 16:33:32 by jguelen ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/*Can create circular chain list -> be careful of the dangling part then
and new not to be NULL*/
void ft_lstadd_front(t_list **lst, t_list *new)
{
new->next = *lst;
*lst = new;
}