summaryrefslogtreecommitdiffstats
path: root/libft/src/ft_lstadd_front.c
diff options
context:
space:
mode:
Diffstat (limited to 'libft/src/ft_lstadd_front.c')
-rw-r--r--libft/src/ft_lstadd_front.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libft/src/ft_lstadd_front.c b/libft/src/ft_lstadd_front.c
index fac38cc..6e4e725 100644
--- a/libft/src/ft_lstadd_front.c
+++ b/libft/src/ft_lstadd_front.c
@@ -11,12 +11,14 @@
/* ************************************************************************** */
#include <libft.h>
+#include <stddef.h>
-void
- ft_lstadd_front(t_list **alst, t_list *new)
+void ft_lstadd_front(t_list **alst, t_list *new)
{
- if (!alst || !new)
+ if (alst == NULL || new == NULL)
+ {
return ;
+ }
new->next = *alst;
*alst = new;
}