From 3237c8706ec95b42c11f43789a8a4538a38f7045 Mon Sep 17 00:00:00 2001 From: Jack Halford Date: Wed, 8 Mar 2017 12:00:51 +0100 Subject: [PATCH] makefile update --- libftasm/Makefile | 1 - libftasm/includes/libft.h | 2 +- libftasm/src/btree/btree_map.c | 2 +- libftasm/src/lst/ft_lstmap.c | 8 ++++---- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/libftasm/Makefile b/libftasm/Makefile index b699473b..fbc1aded 100644 --- a/libftasm/Makefile +++ b/libftasm/Makefile @@ -94,7 +94,6 @@ lst/ft_lst_sorted_merge.c\ lst/ft_lstadd.c\ lst/ft_lstdel.c\ lst/ft_lstdelone.c\ -lst/ft_lstdup.c\ lst/ft_lsteadd.c\ lst/ft_lstiter.c\ lst/ft_lstlast.c\ diff --git a/libftasm/includes/libft.h b/libftasm/includes/libft.h index 661a3824..1b4da10e 100644 --- a/libftasm/includes/libft.h +++ b/libftasm/includes/libft.h @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/07 13:49:04 by jhalford #+# #+# */ -/* Updated: 2017/03/08 11:58:07 by jhalford ### ########.fr */ +/* Updated: 2017/03/08 11:59:43 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/libftasm/src/btree/btree_map.c b/libftasm/src/btree/btree_map.c index 3589933f..deb32d44 100644 --- a/libftasm/src/btree/btree_map.c +++ b/libftasm/src/btree/btree_map.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/03/08 11:50:46 by jhalford #+# #+# */ -/* Updated: 2017/03/08 11:53:47 by jhalford ### ########.fr */ +/* Updated: 2017/03/08 12:03:17 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/libftasm/src/lst/ft_lstmap.c b/libftasm/src/lst/ft_lstmap.c index 9c36de2e..3b422790 100644 --- a/libftasm/src/lst/ft_lstmap.c +++ b/libftasm/src/lst/ft_lstmap.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/03 14:57:21 by jhalford #+# #+# */ -/* Updated: 2017/03/08 11:58:32 by jhalford ### ########.fr */ +/* Updated: 2017/03/08 12:03:14 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,11 +14,11 @@ t_list *ft_lstmap(t_list *lst, void *(*f)(void *)) { - t_list *out; t_list *elem; - elem = ft_lstnew(lst->content, lst->content_size); - elem = (*f)(lst); + if (!lst) + return (NULL); + elem = ft_lstnew((*f)(lst->content), lst->content_size); elem->next = ft_lstmap(lst->next, f); return (elem); }