summaryrefslogtreecommitdiffstats
path: root/src/s_lalias.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/s_lalias.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 '')
-rw-r--r--src/s_lalias.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/s_lalias.c b/src/s_lalias.c
index eeac08b..56b3985 100644
--- a/src/s_lalias.c
+++ b/src/s_lalias.c
@@ -72,7 +72,8 @@ void
t_lalias
*s_lalias_new(const char name[], const char val[])
{
- t_lalias *link;
+ t_lalias *link;
+ static size_t id = 1;
if ((link = (t_lalias*)malloc(sizeof(t_lalias))) == NULL)
{
@@ -86,6 +87,8 @@ t_lalias
{
return (NULL);
}
+ link->id = id;
link->next = NULL;
+ id += 1;
return (link);
}