diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-03 16:07:09 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-03 16:07:09 +0200 |
commit | c2105f8c82ec70fdaca11dd6ee401f93686dc0a0 (patch) | |
tree | d7c980056e6aa534744620ebc32996921e23bc03 /src | |
parent | Normed s_destroy (diff) | |
download | 42-minishell-c2105f8c82ec70fdaca11dd6ee401f93686dc0a0.tar.gz 42-minishell-c2105f8c82ec70fdaca11dd6ee401f93686dc0a0.tar.bz2 42-minishell-c2105f8c82ec70fdaca11dd6ee401f93686dc0a0.tar.xz 42-minishell-c2105f8c82ec70fdaca11dd6ee401f93686dc0a0.tar.zst 42-minishell-c2105f8c82ec70fdaca11dd6ee401f93686dc0a0.zip |
fix
Diffstat (limited to 'src')
-rw-r--r-- | src/s_com.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/s_com.c b/src/s_com.c index 594fd11..f8cbbbf 100644 --- a/src/s_com.c +++ b/src/s_com.c @@ -94,6 +94,8 @@ void s_com_destroy(t_com **com) static void *s_get_nword(char nword[], char word[], t_com *com, t_msh *msh) { + size_t ret; + nword[0] = C_NUL; ft_strlcpy(nword, word, ARG_MAX); if (p_redirs(nword, &com, msh) != 0) @@ -113,7 +115,6 @@ t_com *s_com_new(char word[], t_msh *msh) char nword[ARG_MAX]; t_com *com; char **words; - size_t ret; if ((com = (t_com*)malloc(sizeof(t_com))) == NULL) return (NULL); |