-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_lstpush.c
More file actions
22 lines (20 loc) · 1.04 KB
/
ft_lstpush.c
File metadata and controls
22 lines (20 loc) · 1.04 KB
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: fokrober <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/05/02 17:29:21 by fokrober #+# #+# */
/* Updated: 2019/05/02 22:46:48 by fokrober ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_list *ft_lstpush(t_list *elm, t_list *new)
{
if (!elm && !new)
return (NULL);
while (elm->next)
elm = elm->next;
return ((elm->next = new));
}