summaryrefslogtreecommitdiffstats
path: root/src/b_cd.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-07-30 20:30:58 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-07-30 20:30:58 +0200
commitc19bd35afdb45e49cebdfd96e7adb1e6fe477f0c (patch)
treec5a7655d5fa858da43b0c9e3f1f616d269aae172 /src/b_cd.c
parentWork in progress, freed leak (diff)
download42-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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/b_cd.c b/src/b_cd.c
index c892f7e..f30e61f 100644
--- a/src/b_cd.c
+++ b/src/b_cd.c
@@ -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);
}