From c98de126d2252fe47dc2a9094a5f9a8fa6b4b60a Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sun, 11 Oct 2020 15:52:52 +0200 Subject: Removing libft/minishell_test submodules, Removing subject/README/etc --- libft/src/dstr/ft_dstrdestroy.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 libft/src/dstr/ft_dstrdestroy.c (limited to 'libft/src/dstr/ft_dstrdestroy.c') diff --git a/libft/src/dstr/ft_dstrdestroy.c b/libft/src/dstr/ft_dstrdestroy.c new file mode 100644 index 0000000..c76b692 --- /dev/null +++ b/libft/src/dstr/ft_dstrdestroy.c @@ -0,0 +1,26 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_dstrdestroy.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: charles +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/04/03 13:58:46 by charles #+# #+# */ +/* Updated: 2020/04/04 19:51:28 by charles ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft_dstr.h" + +/* +** \brief Destroy a dynamic string +** \param dstr Dynamic string to destroy +*/ + +void ft_dstrdestroy(t_ftdstr *dstr) +{ + if (dstr == NULL) + return ; + free(dstr->str); + free(dstr); +} -- cgit