aboutsummaryrefslogtreecommitdiff
path: root/qom
diff options
context:
space:
mode:
Diffstat (limited to 'qom')
-rw-r--r--qom/object.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/qom/object.c b/qom/object.c
index e6462f289c..4609e34a6a 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -295,7 +295,7 @@ static void type_initialize(TypeImpl *ti)
GSList *e;
int i;
- g_assert_cmpint(parent->class_size, <=, ti->class_size);
+ g_assert(parent->class_size <= ti->class_size);
memcpy(ti->class, parent->class, parent->class_size);
ti->class->interfaces = NULL;
ti->class->properties = g_hash_table_new_full(
@@ -372,9 +372,9 @@ static void object_initialize_with_type(void *data, size_t size, TypeImpl *type)
g_assert(type != NULL);
type_initialize(type);
- g_assert_cmpint(type->instance_size, >=, sizeof(Object));
+ g_assert(type->instance_size >= sizeof(Object));
g_assert(type->abstract == false);
- g_assert_cmpint(size, >=, type->instance_size);
+ g_assert(size >= type->instance_size);
memset(obj, 0, type->instance_size);
obj->class = type->class;
@@ -475,7 +475,7 @@ static void object_finalize(void *data)
object_property_del_all(obj);
object_deinit(obj, ti);
- g_assert_cmpint(obj->ref, ==, 0);
+ g_assert(obj->ref == 0);
if (obj->free) {
obj->free(obj);
}
@@ -917,7 +917,7 @@ void object_unref(Object *obj)
if (!obj) {
return;
}
- g_assert_cmpint(obj->ref, >, 0);
+ g_assert(obj->ref > 0);
/* parent always holds a reference to its children */
if (atomic_fetch_dec(&obj->ref) == 1) {