summaryrefslogtreecommitdiffstats
path: root/libft/src/ft_lstadd_back.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-09-29 19:11:10 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-09-29 19:11:10 +0200
commit462e664d0fdfbe2e9eae5c7e093c5a23b202dae8 (patch)
treecff5c7b5852874c8812bfa3dc04cc8df058a2238 /libft/src/ft_lstadd_back.c
parentSome norm (diff)
download42-minishell-462e664d0fdfbe2e9eae5c7e093c5a23b202dae8.tar.gz
42-minishell-462e664d0fdfbe2e9eae5c7e093c5a23b202dae8.tar.bz2
42-minishell-462e664d0fdfbe2e9eae5c7e093c5a23b202dae8.tar.xz
42-minishell-462e664d0fdfbe2e9eae5c7e093c5a23b202dae8.tar.zst
42-minishell-462e664d0fdfbe2e9eae5c7e093c5a23b202dae8.zip
Norm update
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);