diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ft_p_lcom_next.c | 2 | ||||
-rw-r--r-- | src/ft_u_vars.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/ft_p_lcom_next.c b/src/ft_p_lcom_next.c index 4715e47..5e374b6 100644 --- a/src/ft_p_lcom_next.c +++ b/src/ft_p_lcom_next.c @@ -23,7 +23,6 @@ char { /* TODO: norme */ char **p_words; - char **p_env; char *s_varname; int64_t i; size_t varlen; @@ -43,7 +42,6 @@ char if (!(s_varname = ft_substr(*p_words, (uint32_t)i, varlen))) return (NULL); ft_printf("{%s} | {%s}\n", s_varname, ft_subst_var_value(s_varname, msh)); - p_env = msh->envp; ft_memdel((void*)&s_varname); varlen += 1; } diff --git a/src/ft_u_vars.c b/src/ft_u_vars.c index 80288e6..619e83d 100644 --- a/src/ft_u_vars.c +++ b/src/ft_u_vars.c @@ -35,7 +35,8 @@ static char } ft_memcpy((char*)rvarname, (const char*)varname + 1, ft_strlen(varname + 1)); - ft_strlcpy(rvarname + ft_strlen(varname + 1), "=", 2); + *(rvarname + ft_strlen(varname + 1)) = '='; + *(rvarname + ft_strlen(varname + 1) + 1) = '\0'; return (rvarname); } |