diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-30 20:30:58 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-30 20:30:58 +0200 |
commit | c19bd35afdb45e49cebdfd96e7adb1e6fe477f0c (patch) | |
tree | c5a7655d5fa858da43b0c9e3f1f616d269aae172 /src/b_cd.c | |
parent | Work in progress, freed leak (diff) | |
download | 42-minishell-c19bd35afdb45e49cebdfd96e7adb1e6fe477f0c.tar.gz 42-minishell-c19bd35afdb45e49cebdfd96e7adb1e6fe477f0c.tar.bz2 42-minishell-c19bd35afdb45e49cebdfd96e7adb1e6fe477f0c.tar.xz 42-minishell-c19bd35afdb45e49cebdfd96e7adb1e6fe477f0c.tar.zst 42-minishell-c19bd35afdb45e49cebdfd96e7adb1e6fe477f0c.zip |
Double exit no more
Diffstat (limited to '')
-rw-r--r-- | src/b_cd.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -28,7 +28,7 @@ static void if (!(*path = ft_strdup(*args))) { s_destroy(msh); - fail_alloc(msh); + f_fail_alloc(msh); } if (!ft_strncmp("~/", *path, 2) || !ft_strncmp("~", *path, 2)) { @@ -36,7 +36,7 @@ static void "~", u_get_var_value("$HOME", msh)))) { s_destroy(msh); - fail_alloc(msh); + f_fail_alloc(msh); } } } @@ -50,7 +50,7 @@ uint8_t if (argc >= 2) { - fail_too_many_args("cd", msh); + f_fail_too_many_args("cd", msh); return (1); } else if (argc == 0) @@ -62,7 +62,7 @@ uint8_t set_path(&path, args, msh); if (chdir(path) != 0) { - fail_chd("cd", path, msh); + f_fail_chd("cd", path, msh); ft_memdel((void*)&path); return (1); } |