libftx/libft/ft_lstadd_front.c

22 lines
1.0 KiB
C
Raw Normal View History

2023-01-19 11:33:26 -05:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstadd_front.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/09/29 23:50:03 by cchauvet #+# #+# */
/* Updated: 2022/09/30 01:08:27 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstadd_front(t_list **lst, t_list *new)
{
if (new == NULL)
return ;
new->next = *lst;
*lst = new;
}