From 8e2d5cd686f277a14de66d75454f2d7f8c365fb8 Mon Sep 17 00:00:00 2001 From: "Nicholas J. Kain" Date: Mon, 19 Feb 2024 05:38:57 -0500 Subject: [PATCH] Cosmetic changes. --- main.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/main.c b/main.c index b960cb6..77e224d 100644 --- a/main.c +++ b/main.c @@ -710,16 +710,14 @@ static void* clientthread(void *data) { static void gc_threads(void) { if (atomic_load(&g_gc_pending)) { - { - if (pthread_mutex_lock(&g_gc_mtx)) perror("mutex_lock"); - while (g_gc_list) { - struct thread *t = g_gc_list; - g_gc_list = g_gc_list->gc_next; - pthread_join(t->pt, 0); - free(t); - } - if (pthread_mutex_unlock(&g_gc_mtx)) perror("mutex_unlock"); + if (pthread_mutex_lock(&g_gc_mtx)) perror("mutex_lock"); + while (g_gc_list) { + struct thread *t = g_gc_list; + g_gc_list = g_gc_list->gc_next; + pthread_join(t->pt, 0); + free(t); } + if (pthread_mutex_unlock(&g_gc_mtx)) perror("mutex_unlock"); atomic_store(&g_gc_pending, 0); } }