summaryrefslogtreecommitdiffstats
path: root/src/b_alias_register.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-12-18 16:04:14 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-12-18 16:04:14 +0100
commit7629736298b29ad5be833c11d338ab3abe236917 (patch)
tree8c4161357ae75109bcc7b8bf38bcd8b985ea3774 /src/b_alias_register.c
parentMerge (diff)
parentPush (diff)
download42-minishell-7629736298b29ad5be833c11d338ab3abe236917.tar.gz
42-minishell-7629736298b29ad5be833c11d338ab3abe236917.tar.bz2
42-minishell-7629736298b29ad5be833c11d338ab3abe236917.tar.xz
42-minishell-7629736298b29ad5be833c11d338ab3abe236917.tar.zst
42-minishell-7629736298b29ad5be833c11d338ab3abe236917.zip
Merged branch 'gnu-compat'
Diffstat (limited to 'src/b_alias_register.c')
-rw-r--r--src/b_alias_register.c8
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);
}
}
-
-