From: Adam Dickmeiss Date: Tue, 23 Mar 2010 14:33:43 +0000 (+0100) Subject: Simplify http_server_destroy X-Git-Tag: v1.4.0~59^2~1 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=f9fd1939f30660831f6390a91839357133e005ea;p=pazpar2-moved-to-github.git Simplify http_server_destroy --- 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) {