From 462e664d0fdfbe2e9eae5c7e093c5a23b202dae8 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 29 Sep 2020 19:11:10 +0200 Subject: Norm update --- libft/src/ft_lstadd_back.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'libft/src/ft_lstadd_back.c') 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 #include -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); -- cgit v1.2.3