Début must_eat

This commit is contained in:
Xamora 2023-03-28 12:28:34 +02:00
parent 5c36ef01cd
commit bf18eed965
2 changed files with 4 additions and 5 deletions

View file

@ -42,7 +42,8 @@ typedef struct s_same
typedef struct s_only typedef struct s_only
{ {
int *id; int id;
int eat;
} t_only; } t_only;
typedef struct s_philo typedef struct s_philo

View file

@ -155,12 +155,10 @@ t_same *create_struct_same(t_config *config)
t_only *create_struct_only(int id) t_only *create_struct_only(int id)
{ {
t_only *only; t_only *only;
int *id_alloc;
only = ft_calloc(sizeof(t_only), 1); only = ft_calloc(sizeof(t_only), 1);
id_alloc = ft_calloc(sizeof(int), 1); only->id = id;
*id_alloc = id; only->eat = 0;
only->id = id_alloc;
return (only); return (only);
} }