diff options
Diffstat (limited to '')
-rw-r--r-- | src/b_alias_register.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/b_alias_register.c b/src/b_alias_register.c index 8f75e36..0170a59 100644 --- a/src/b_alias_register.c +++ b/src/b_alias_register.c @@ -31,14 +31,16 @@ static void b_cpy_alias(char name[], char *ptr, char value[]) rptr++; tmp = *(rptr + ft_strlen(name)); *(rptr + ft_strlen(name)) = C_NUL; - if (ft_strncmp(rptr, name, ft_strlen(name) + 1) == 0) { + if (ft_strncmp(rptr, name, ft_strlen(name) + 1) == 0) + { *(rptr + ft_strlen(name)) = tmp; ft_strlcpy(value, ptr, ARG_MAX); ft_memmove(value + (rptr - ptr) + 1, value + (rptr - ptr), ft_strlen(value + (rptr - ptr)) + 1); *(value + (rptr - ptr)) = C_BACKS; } - else { + else + { *(rptr + ft_strlen(name)) = tmp; ft_strlcpy(value, ptr, ARG_MAX); } @@ -63,5 +65,3 @@ void b_register_arg(const char arg[], t_msh *msh) u_set_alias_value(name, value, msh); } } - - |