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
|
typedef struct s_only
|
||||||
{
|
{
|
||||||
int *id;
|
int id;
|
||||||
|
int eat;
|
||||||
} t_only;
|
} t_only;
|
||||||
|
|
||||||
typedef struct s_philo
|
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 *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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue