-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_lstpush.c
22 lines (20 loc) · 1.02 KB
/
ft_lstpush.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstpush.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mesafi <mesafi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/11 19:49:41 by mesafi #+# #+# */
/* Updated: 2019/11/14 21:35:52 by mesafi ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstpush(t_list *head, t_list *new)
{
if (head == NULL)
return ;
while (head->next)
head = head->next;
head->next = new;
}