summaryrefslogtreecommitdiffstats
path: root/libft/src/ft_lstadd_back.c
diff options
context:
space:
mode:
Diffstat (limited to 'libft/src/ft_lstadd_back.c')
-rw-r--r--libft/src/ft_lstadd_back.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/libft/src/ft_lstadd_back.c b/libft/src/ft_lstadd_back.c
index 3f031ab..28065c2 100644
--- a/libft/src/ft_lstadd_back.c
+++ b/libft/src/ft_lstadd_back.c
@@ -13,15 +13,18 @@
#include <libft.h>
#include <stddef.h>
-void
- ft_lstadd_back(t_list **alst, t_list *new)
+void ft_lstadd_back(t_list **alst, t_list *new)
{
- t_list *tmp;
+ t_list *tmp;
- if (!alst || !new)
+ if (alst == NULL || new == NULL)
+ {
return ;
- if (!*alst)
+ }
+ if (*alst == NULL)
+ {
*alst = new;
+ }
else
{
tmp = ft_lstlast(*alst);