aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c
new file mode 100644
index 0000000..2b655bf
--- /dev/null
+++ b/src/utils.c
@@ -0,0 +1,32 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* util.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/02/28 11:56:31 by cacharle #+# #+# */
+/* Updated: 2020/02/28 11:57:30 by cacharle ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+/**
+** \file utils.c
+** \brief Various functions
+*/
+
+#include "minishell.h"
+
+/**
+** \brief Delete function for a entry containing a allocated key and value
+** \param content Hash table entry content
+*/
+
+void ms_ht_del_str_entry(t_ftht_content *content)
+{
+ if (content == NULL)
+ return ;
+ free(content->key);
+ free(content->value);
+ free(content);
+}