protection segfault creation zero philosophs + deplacement fichiers dans philo + ajout exeption philo folder dans gitignore
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -12,3 +12,4 @@ Thumbs.db
|
|||||||
*.lnk
|
*.lnk
|
||||||
*.zip
|
*.zip
|
||||||
philo
|
philo
|
||||||
|
!philo/
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: hulamy <hulamy@student.42.fr> +#+ +:+ +#+ */
|
/* By: hulamy <hulamy@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2022/01/26 15:30:34 by hulamy #+# #+# */
|
/* 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;
|
philo = tmp;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
philo->next = start;
|
if (philo)
|
||||||
|
philo->next = start;
|
||||||
return (philo);
|
return (philo);
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user