42_libft/ft_lstadd_front.c

22 lines
1.0 KiB
C
Raw Permalink Normal View History

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