From 5a11c875d8c95d480e6f32b57e969ee34ca1940d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 5 Nov 2009 20:08:17 -0500 Subject: [PATCH] Cosmetic --- src/hb-blob.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/hb-blob.c b/src/hb-blob.c index 60982f89..6058e96f 100644 --- a/src/hb-blob.c +++ b/src/hb-blob.c @@ -197,12 +197,13 @@ hb_blob_lock (hb_blob_t *blob) hb_mutex_lock (blob->lock); - blob->lock_count++; #if HB_DEBUG_BLOB fprintf (stderr, "%p %s (%d) -> %p\n", blob, __FUNCTION__, blob->lock_count, blob->data); #endif + blob->lock_count++; + hb_mutex_unlock (blob->lock); return blob->data; @@ -216,13 +217,14 @@ hb_blob_unlock (hb_blob_t *blob) hb_mutex_lock (blob->lock); - assert (blob->lock_count > 0); - blob->lock_count--; #if HB_DEBUG_BLOB fprintf (stderr, "%p %s (%d) -> %p\n", blob, __FUNCTION__, - hb_atomic_int_get (blob->lock_count), blob->data); + blob->lock_count, blob->data); #endif + assert (blob->lock_count > 0); + blob->lock_count--; + hb_mutex_unlock (blob->lock); } -- GitLab