summaryrefslogtreecommitdiffstats
path: root/src/u_alias.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-09-12 16:33:02 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-09-12 16:33:02 +0200
commit949f93b57b6411b07eb12110e0db37cdf393db0c (patch)
treece90ac0b84cbdab7c3ea2c47c8397310045db386 /src/u_alias.c
parentFix (diff)
download42-minishell-949f93b57b6411b07eb12110e0db37cdf393db0c.tar.gz
42-minishell-949f93b57b6411b07eb12110e0db37cdf393db0c.tar.bz2
42-minishell-949f93b57b6411b07eb12110e0db37cdf393db0c.tar.xz
42-minishell-949f93b57b6411b07eb12110e0db37cdf393db0c.tar.zst
42-minishell-949f93b57b6411b07eb12110e0db37cdf393db0c.zip
Fuck
Diffstat (limited to 'src/u_alias.c')
-rw-r--r--src/u_alias.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/u_alias.c b/src/u_alias.c
index 92bd498..14ca75e 100644
--- a/src/u_alias.c
+++ b/src/u_alias.c
@@ -18,7 +18,7 @@
#include "s_lalias.h"
#include "s_struct.h"
-uint8_t
+size_t
u_get_alias_value(char str[], const char name[], size_t dstsize, t_msh *msh)
{
t_lalias *ptr;
@@ -34,13 +34,13 @@ uint8_t
}
if (ptr == NULL)
{
- return (1);
+ return (0);
}
if (str != NULL)
{
ft_strlcpy(str, ptr->val, dstsize);
}
- return (0);
+ return (ptr->id);
}
void
@@ -48,7 +48,7 @@ void
{
t_lalias *new;
- if (u_get_alias_value(NULL, name, 0, msh) == 0)
+ if (u_get_alias_value(NULL, name, 0, msh) != 0)
{
s_lalias_rebind(&msh->alias, name, value);
}