diff options
Diffstat (limited to 'src/s_com.c')
-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); |