mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
Expansion: Most changes dealt with
This commit is contained in:
parent
532d71efb0
commit
2a61706f1a
6 changed files with 64 additions and 35 deletions
10
src/env/env_manip.c
vendored
10
src/env/env_manip.c
vendored
|
|
@ -3,10 +3,10 @@
|
|||
/* ::: :::::::: */
|
||||
/* env_manip.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* By: jguelen <jguelen@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/03/19 17:55/24 by khais #+# #+# */
|
||||
/* Updated: 2025/03/19 17:55:24 by khais ### ########.fr */
|
||||
/* Created: 2025/03/19 17:55:24 by khais #+# #+# */
|
||||
/* Updated: 2025/03/21 18:49:56 by jguelen ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ void env_rm_entry(t_env **env, char *key)
|
|||
|
||||
if (env == NULL || (*env) == NULL)
|
||||
return ;
|
||||
if (strncmp((*env)->key, key, INT_MAX) == 0)
|
||||
if (ft_strncmp((*env)->key, key, INT_MAX) == 0)
|
||||
{
|
||||
next = (*env)->next;
|
||||
env_destroy_node(*env);
|
||||
|
|
@ -59,7 +59,7 @@ void env_rm_entry(t_env **env, char *key)
|
|||
current = *env;
|
||||
while (current->next)
|
||||
{
|
||||
if (strncmp(current->next->key, key, INT_MAX) == 0)
|
||||
if (ft_strncmp(current->next->key, key, INT_MAX) == 0)
|
||||
{
|
||||
next = current->next;
|
||||
current->next = next->next;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue