Editing to be normed \!
This commit is contained in:
parent
501b45d763
commit
3d145fb1e3
6 changed files with 17 additions and 25 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/06/04 11:42:37 by rparodi #+# #+# */
|
||||
/* Updated: 2024/07/18 20:00:09 by rparodi ### ########.fr */
|
||||
/* Updated: 2024/07/18 21:18:10 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -17,6 +17,8 @@ t_error ft_parsing_args(t_i32 argc, t_str *argv, t_philo *philo)
|
|||
t_usize tmp;
|
||||
|
||||
tmp = 0;
|
||||
philo->eating = 0;
|
||||
philo->eating_count = 0;
|
||||
ft_atou(argv[1], &tmp);
|
||||
if (tmp == 0)
|
||||
return (ERROR);
|
||||
|
|
@ -66,8 +68,6 @@ t_error ft_init_philo(t_i32 argc, t_str *argv, t_program *prog, t_mutex *forks)
|
|||
while (i < ft_atou_return(argv[1]))
|
||||
{
|
||||
prog->philos[i].id = i + 1;
|
||||
prog->philos[i].eating = 0;
|
||||
prog->philos[i].eating_count = 0;
|
||||
ft_parsing_args(argc, argv, &prog->philos[i]);
|
||||
prog->philos[i].start_time = ft_time();
|
||||
prog->philos[i].t_last_eat = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue