diff options
Diffstat (limited to '')
-rw-r--r-- | src/s_init.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/s_init.c b/src/s_init.c index cfe2eeb..fb63548 100644 --- a/src/s_init.c +++ b/src/s_init.c @@ -163,11 +163,10 @@ t_msh char cwd[PATH_MAX]; t_msh *msh; - if (!(msh = (t_msh*)malloc(sizeof(t_msh)))) + if ((msh = (t_msh*)malloc(sizeof(t_msh))) == NULL) return (NULL); - if (!(msh->shname = ft_strdup(argv[0]))) + if ((msh->shname = ft_strdup(argv[0])) == NULL) return (NULL); - /* TODO: shname: care about "./", try with symlinks */ msh->envp = NULL; if ((msh->envp = dupenv(envp)) == NULL) return (NULL); @@ -177,6 +176,7 @@ t_msh msh->com = NULL; msh->pipes = NULL; msh->vars = NULL; + msh->alias = NULL; set_cwd(cwd, msh); if ((msh->cwd = ft_strdup(cwd)) == NULL) return (NULL); |