From f51039c735a4926ff5f4f970f2d8295913545568 Mon Sep 17 00:00:00 2001 From: starnakin Date: Thu, 20 Apr 2023 18:27:12 +0200 Subject: [PATCH] ?fix: initialise all value --- philo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/philo.c b/philo.c index 7eb13a2..6311040 100644 --- a/philo.c +++ b/philo.c @@ -146,7 +146,9 @@ t_philo *philo_init(t_data *data) philo->id = id++; philo->data = data; philo->nb_meal = 0; + philo->stop = 0; philo->last_eat = get_time(); + philo->last_sleep = get_time(); pthread_mutex_init(&philo->nb_meal_mutex, NULL); pthread_mutex_init(&philo->last_eat_mutex, NULL); pthread_mutex_init(&philo->last_sleep_mutex, NULL);