diff options
Diffstat (limited to '')
-rw-r--r-- | src/b_cd.c | 4 | ||||
-rw-r--r-- | src/s_com.c | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -28,11 +28,11 @@ static void char *args[], t_msh *msh) { - if (!(*path = ft_strdup(*args))) + if ((*path = ft_strdup(*args)) == NULL) { f_alloc_and_destroy_msh(msh); } - if (!ft_strncmp("~/", *path, 2) || !ft_strncmp("~", *path, 2)) + if (ft_strncmp("~/", *path, 2) == 0 || !ft_strncmp("~", *path, 2)) { if (!(*path = ft_strsubst(*path, "~", u_get_var_value("$HOME", msh)))) diff --git a/src/s_com.c b/src/s_com.c index 576b407..2abbe9e 100644 --- a/src/s_com.c +++ b/src/s_com.c @@ -113,9 +113,9 @@ t_com com->env_fork = NULL; if (get_redir(word, &com) != 0) return (NULL); - if (!(words = p_subst_args(word, com->redir))) + if ((words = p_subst_args(word, com->redir)) == NULL) return (NULL); - if (!(words = p_subst_vars(words, msh))) + if ((words = p_subst_vars(words, msh)) == NULL) return (NULL); words = p_check_args_equals(words, msh); if (msh->env_fork_tmp[0][0] != '\0') |