From b135ba89ccceffa88356cc25f256b0cb2adbd88c Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 19 Mar 2020 21:59:13 +0100 Subject: The og OOP --- src/ft_sfx_death.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ft_sfx_death.c') diff --git a/src/ft_sfx_death.c b/src/ft_sfx_death.c index edc38ef..23dd26f 100644 --- a/src/ft_sfx_death.c +++ b/src/ft_sfx_death.c @@ -24,11 +24,11 @@ void else pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); sfx = (t_sfx *)vargp; - pthread_mutex_lock(&sfx->death_mutex); + pthread_mutex_lock(&sfx[0].mutex); while (1) { - pthread_mutex_lock(&sfx->death_mutex); - if (system(sfx->death)) + pthread_mutex_lock(&sfx[0].mutex); + if (system(sfx[0].cmd)) pthread_exit(NULL); } return (NULL); @@ -37,5 +37,5 @@ void void ft_sfx_death(t_sfx *sfx) { - pthread_mutex_unlock(&cl->sfx.death_mutex); + pthread_mutex_unlock(&sfx[0].mutex); } -- cgit v1.2.3