Début must_eat
This commit is contained in:
parent
5c36ef01cd
commit
bf18eed965
|
@ -42,7 +42,8 @@ typedef struct s_same
|
|||
|
||||
typedef struct s_only
|
||||
{
|
||||
int *id;
|
||||
int id;
|
||||
int eat;
|
||||
} t_only;
|
||||
|
||||
typedef struct s_philo
|
||||
|
|
|
@ -155,12 +155,10 @@ t_same *create_struct_same(t_config *config)
|
|||
t_only *create_struct_only(int id)
|
||||
{
|
||||
t_only *only;
|
||||
int *id_alloc;
|
||||
|
||||
only = ft_calloc(sizeof(t_only), 1);
|
||||
id_alloc = ft_calloc(sizeof(int), 1);
|
||||
*id_alloc = id;
|
||||
only->id = id_alloc;
|
||||
only->id = id;
|
||||
only->eat = 0;
|
||||
return (only);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue