summaryrefslogtreecommitdiff
path: root/glib/deprecated
diff options
context:
space:
mode:
Diffstat (limited to 'glib/deprecated')
-rw-r--r--glib/deprecated/gthread-deprecated.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/glib/deprecated/gthread-deprecated.c b/glib/deprecated/gthread-deprecated.c
index cb685e309..b53dfce6e 100644
--- a/glib/deprecated/gthread-deprecated.c
+++ b/glib/deprecated/gthread-deprecated.c
@@ -806,8 +806,11 @@ g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex)
rm = g_static_rec_mutex_get_rec_mutex_impl (mutex);
depth = mutex->depth;
- while (mutex->depth--)
- g_rec_mutex_unlock (rm);
+ while (mutex->depth)
+ {
+ mutex->depth--;
+ g_rec_mutex_unlock (rm);
+ }
return depth;
}