mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-11 03:34:05 +02:00
GMappedFile: remove nonatomic accesses to ref_count
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user