remise a sa place de env init

This commit is contained in:
Nathan Lebrun
2025-01-20 13:36:43 +01:00
parent b319c2129f
commit 9ee0c5bf2d
3 changed files with 19 additions and 18 deletions

View File

@@ -40,24 +40,6 @@ char **ft_setnewenv(void)
return (envp);
}
char **init_env(char **envp)
{
char **env;
int i;
i = 0;
env = malloc(sizeof(char *) * (count_var(envp) + 1));
if (!env)
return (NULL);
env[count_var(envp)] = NULL;
while (envp[i])
{
env[i] = ft_strdup(envp[i]);
i++;
}
return (env);
}
t_data *init_data(char **envp)
{
t_data *data;