[glib] GMappedFile: remove nonatomic accesses to ref_count



commit 4971c43da8b2c76e5fd26ef23e47a1301d31f078
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jun 6 01:04:19 2011 -0400

    GMappedFile: remove nonatomic accesses to ref_count

 glib/gmappedfile.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
---
diff --git a/glib/gmappedfile.c b/glib/gmappedfile.c
index 2af6630..b786517 100644
--- a/glib/gmappedfile.c
+++ b/glib/gmappedfile.c
@@ -315,7 +315,6 @@ GMappedFile *
 g_mapped_file_ref (GMappedFile *file)
 {
   g_return_val_if_fail (file != NULL, NULL);
-  g_return_val_if_fail (file->ref_count > 0, file);
 
   g_atomic_int_inc (&file->ref_count);
 
@@ -337,7 +336,6 @@ void
 g_mapped_file_unref (GMappedFile *file)
 {
   g_return_if_fail (file != NULL);
-  g_return_if_fail (file->ref_count > 0);
 
   if (g_atomic_int_dec_and_test (&file->ref_count))
     g_mapped_file_destroy (file);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]