resolved unexpected additionnal call to the chained list

This commit is contained in:
hugogogo
2022-01-09 11:10:04 +01:00
parent 4b37e5392e
commit 48118ae3ab
3 changed files with 24 additions and 10 deletions

View File

@@ -35,7 +35,7 @@ t_philo *init_chain_philo(t_conditions *conditions, int n)
return (philo);
}
t_philo *init(char **av, pthread_t *id)
t_philo *init(char **av, pthread_t **id)
{
t_philo *philo;
t_conditions *conditions;
@@ -44,7 +44,7 @@ t_philo *init(char **av, pthread_t *id)
n = ft_atoi(av[1]);
conditions = malloc(sizeof(t_conditions));
conditions->n_phi = n;
id = malloc(sizeof(int) * n);
*id = malloc(sizeof(int) * n);
philo = init_chain_philo(conditions, n);
return (philo);
}