bonus: ft_lstadd
This commit is contained in:
parent
572a71e68b
commit
fdeff2ca9b
1 changed files with 10 additions and 0 deletions
10
libft/ft_lstadd.c
Normal file
10
libft/ft_lstadd.c
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#include "libft.h"
|
||||
|
||||
void ft_lstadd(t_list **alst, t_list *new)
|
||||
{
|
||||
if (new)
|
||||
{
|
||||
new->next = *alst;
|
||||
*alst = new;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue