resolved unexpected additionnal call to the chained list
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user