protection segfault creation zero philosophs + deplacement fichiers dans philo + ajout exeption philo folder dans gitignore

This commit is contained in:
Hugo LAMY
2022-01-27 15:08:56 +01:00
parent e45ca1331f
commit 836c02f3f5
12 changed files with 4 additions and 2 deletions

1
.gitignore vendored
View File

@@ -12,3 +12,4 @@ Thumbs.db
*.lnk
*.zip
philo
!philo/

View File

@@ -6,7 +6,7 @@
/* By: hulamy <hulamy@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/01/26 15:30:34 by hulamy #+# #+# */
/* Updated: 2022/01/26 18:15:42 by hulamy ### ########.fr */
/* Updated: 2022/01/27 15:01:30 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
@@ -50,7 +50,8 @@ static t_philo *init_chain_philo(t_params *params, t_global *global)
philo = tmp;
i++;
}
philo->next = start;
if (philo)
philo->next = start;
return (philo);
}