42_solong/libftx/libft/ft_lstadd_front.c
Camille Chauvet 9e58abcd5c kekw
2022-12-22 17:54:17 +01:00

22 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* 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;
}