diff options
author | Markus Armbruster <armbru@redhat.com> | 2018-06-08 19:02:31 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2018-06-13 13:47:35 +0200 |
commit | 719a30776b94d3da8c613e5047414f483d40256d (patch) | |
tree | a899180e926787270459b47a6235ab61beafb4ff /qom/object.c | |
parent | 04a0afe52852e6b6d6f81230b6d7acd25dac88dd (diff) | |
download | qemu-719a30776b94d3da8c613e5047414f483d40256d.zip qemu-719a30776b94d3da8c613e5047414f483d40256d.tar.gz qemu-719a30776b94d3da8c613e5047414f483d40256d.tar.bz2 |
Purge uses of banned g_assert_FOO()
We banned use of certain g_assert_FOO() functions outside tests, and
made checkpatch.pl flag them (commit 6e9389563e5). We neglected to
purge existing uses. Do that now.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180608170231.27912-1-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'qom/object.c')
-rw-r--r-- | qom/object.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/qom/object.c b/qom/object.c index e6462f2..4609e34 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) { |