dont need this anymorre?

This commit is contained in:
whaffman 2025-03-03 12:01:33 +01:00
parent 8e5deaa6c0
commit dd332b54d0

View File

@ -6,7 +6,7 @@
/* By: whaffman <whaffman@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2025/02/04 16:13:33 by whaffman #+# #+# */
/* Updated: 2025/02/26 16:09:07 by whaffman ######## odam.nl */
/* Updated: 2025/03/03 12:00:19 by whaffman ######## odam.nl */
/* */
/* ************************************************************************** */
@ -22,18 +22,9 @@ void environment_add(t_minishell *msh, char *name, char *value)
if (name != NULL && value != NULL)
{
new_environment = malloc_safe(msh, sizeof(t_environment));
if (new_environment == NULL)
return (perror("malloc"));
new_environment->name = ft_strdup_safe(msh, name);
new_environment->value = ft_strdup_safe(msh, value);
new_node = ft_lstnew_safe(msh, new_environment);
if (new_node == NULL
|| new_environment->name == NULL
|| new_environment->value == NULL)
{
environment_free(msh, new_environment);
return (perror("malloc"));
}
ft_lstadd_back(environment, new_node);
}
}