aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-store.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-06-01 18:04:16 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-06-01 18:04:16 +0800
commit9d0aab53ebb89bc4966d39011a6cb776ff35fe75 (patch)
treeb7b78d3262b09940acf28ce650dec4fccf23a4f5 /mail/e-mail-store.c
parentf378be19c6015119dec558dc77a2334432c2fea9 (diff)
downloadgsoc2013-evolution-9d0aab53ebb89bc4966d39011a6cb776ff35fe75.tar.gz
gsoc2013-evolution-9d0aab53ebb89bc4966d39011a6cb776ff35fe75.tar.zst
gsoc2013-evolution-9d0aab53ebb89bc4966d39011a6cb776ff35fe75.zip
Fix build breaks.
Diffstat (limited to 'mail/e-mail-store.c')
-rw-r--r--mail/e-mail-store.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/mail/e-mail-store.c b/mail/e-mail-store.c
index 1aef04acf9..948683d5e4 100644
--- a/mail/e-mail-store.c
+++ b/mail/e-mail-store.c
@@ -104,7 +104,7 @@ store_info_ref (StoreInfo *store_info)
g_return_val_if_fail (store_info != NULL, store_info);
g_return_val_if_fail (store_info->ref_count > 0, store_info);
- g_atomic_int_add (&store_info->ref_count, 1);
+ g_atomic_int_inc (&store_info->ref_count);
return store_info;
}
@@ -115,19 +115,19 @@ store_info_unref (StoreInfo *store_info)
g_return_if_fail (store_info != NULL);
g_return_if_fail (store_info->ref_count > 0);
- if (g_atomic_int_add (&store_info->ref_count, -1) > 1)
- return;
+ if (g_atomic_int_dec_and_test (&store_info->ref_count)) {
- g_object_unref (store_info->store);
- g_free (store_info->display_name);
+ g_object_unref (store_info->store);
+ g_free (store_info->display_name);
- if (store_info->vtrash != NULL)
- g_object_unref (store_info->vtrash);
+ if (store_info->vtrash != NULL)
+ g_object_unref (store_info->vtrash);
- if (store_info->vjunk != NULL)
- g_object_unref (store_info->vjunk);
+ if (store_info->vjunk != NULL)
+ g_object_unref (store_info->vjunk);
- g_slice_free (StoreInfo, store_info);
+ g_slice_free (StoreInfo, store_info);
+ }
}
static void