ft_lstadd.c 1.0 KB

123456789101112131415161718192021
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* ft_lstadd.c :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: bchanot <bchanot@student.42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2017/12/05 13:31:14 by bchanot #+# #+# */
  9. /* Updated: 2017/12/08 14:21:18 by bchanot ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "libft.h"
  13. void ft_lstadd(t_slist **alst, t_slist *new)
  14. {
  15. if (*alst == NULL || new == NULL)
  16. return ;
  17. new->next = *alst;
  18. *alst = new;
  19. }