You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
1.0 KiB
23 lines
1.0 KiB
3 years ago
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* ft_lstadd_front_bonus.c :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: narnaud <narnaud@student.42.fr> +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2021/10/22 14:48:11 by narnaud #+# #+# */
|
||
|
/* Updated: 2021/11/15 13:07:10 by narnaud ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#include "libft.h"
|
||
|
|
||
|
void ft_lstadd_front(t_list **alst, t_list *new)
|
||
|
{
|
||
|
if (!alst || !new)
|
||
|
return ;
|
||
|
if (*alst)
|
||
|
new->next = *alst;
|
||
|
*alst = new;
|
||
|
}
|