diff options
Diffstat (limited to 'c12/ex13/ft_list_merge.c')
| -rw-r--r-- | c12/ex13/ft_list_merge.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/c12/ex13/ft_list_merge.c b/c12/ex13/ft_list_merge.c index 4de2ff3..34c9614 100644 --- a/c12/ex13/ft_list_merge.c +++ b/c12/ex13/ft_list_merge.c @@ -6,15 +6,20 @@ /* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/07/19 08:50:01 by cacharle #+# #+# */ -/* Updated: 2019/07/19 08:51:36 by cacharle ### ########.fr */ +/* Updated: 2019/07/23 15:40:47 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ -void ft_list_merge(t_list **begin_list1, t_list *begin_list2) +#include <stdlib.h> +#include "ft_list.h" + +void ft_list_merge(t_list **begin_list1, t_list *begin_list2) { t_list *cursor; cursor = *begin_list1; + if (cursor == NULL) + *begin_list1 = begin_list2; while (cursor->next) cursor = cursor->next; cursor->next = begin_list2; |
