diff --git a/42sh/Makefile b/42sh/Makefile index 76d15b32..2a885d45 100644 --- a/42sh/Makefile +++ b/42sh/Makefile @@ -264,7 +264,6 @@ line-editing/print_and_del.c\ line-editing/queue.c\ line-editing/readline.c\ line-editing/resize.c\ -main/content_free.c\ main/data_exit.c\ main/data_init.c\ main/data_singleton.c\ diff --git a/42sh/src/main/content_free.c b/42sh/src/main/content_free.c deleted file mode 100644 index 3c025475..00000000 --- a/42sh/src/main/content_free.c +++ /dev/null @@ -1,19 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* content_free.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: gwojda +#+ +:+ +#+ */ -/* +#+#+#+#+#+ +#+ */ -/* Created: 2017/03/15 16:05:27 by gwojda #+# #+# */ -/* Updated: 2017/03/15 16:35:18 by gwojda ### ########.fr */ -/* */ -/* ************************************************************************** */ - -#include "minishell.h" - -void content_free(void *data, size_t content_size) -{ - (void)content_size; - free(data); -} diff --git a/42sh/src/main/instruction_free.c b/42sh/src/main/instruction_free.c index 03b4d989..e4b66c19 100644 --- a/42sh/src/main/instruction_free.c +++ b/42sh/src/main/instruction_free.c @@ -6,7 +6,7 @@ /* By: gwojda +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/03/15 15:54:59 by gwojda #+# #+# */ -/* Updated: 2017/03/15 16:36:14 by gwojda ### ########.fr */ +/* Updated: 2017/03/15 16:49:10 by gwojda ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,10 +16,10 @@ int instruction_free(t_list **token, t_parser *parser, t_btree **ast) { ft_lstdel(token, &token_free); token = NULL; - ft_lstdel(&parser->stack, &content_free); - btree_del(ast, &content_free); + ft_lstdel(&parser->stack, &ft_lst_cfree); + btree_del(ast, &ft_lst_cfree); ft_lstdel(&data_singleton()->heredoc_queue, &redir_free); - ft_lstdel(&data_singleton()->exec.op_stack, &content_free); + ft_lstdel(&data_singleton()->exec.op_stack, &ft_lst_cfree); free(parser->new_sym); return (0); }