From f9fd1939f30660831f6390a91839357133e005ea Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 23 Mar 2010 15:33:43 +0100 Subject: [PATCH 1/1] Simplify http_server_destroy --- src/http.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/http.c b/src/http.c index 60d8e30..8321bb3 100644 --- a/src/http.c +++ b/src/http.c @@ -1374,14 +1374,9 @@ void http_server_destroy(http_server_t hs) { int r; - if (hs->mutex) - { - yaz_mutex_enter(hs->mutex); - r = --(hs->ref_count); - yaz_mutex_leave(hs->mutex); - } - else - r = --(hs->ref_count); + yaz_mutex_enter(hs->mutex); /* OK: hs->mutex may be NULL */ + r = --(hs->ref_count); + yaz_mutex_leave(hs->mutex); if (r == 0) { -- 1.7.10.4