diff options
| author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2020-05-12 09:00:19 +0200 |
|---|---|---|
| committer | Markus Armbruster <armbru@redhat.com> | 2020-05-15 07:08:14 +0200 |
| commit | 688ffbb4f72bf9a75c7ff3a899a9617de61d5fd6 (patch) | |
| tree | 98137bc80565df6a363847506617f177167122c3 /qom/object.c | |
| parent | 96449e4a30a56e3303d6d0407aca130c71671754 (diff) | |
| download | focaccia-qemu-688ffbb4f72bf9a75c7ff3a899a9617de61d5fd6.tar.gz focaccia-qemu-688ffbb4f72bf9a75c7ff3a899a9617de61d5fd6.zip | |
various: Remove unnecessary OBJECT() cast
The OBJECT() macro is defined as: #define OBJECT(obj) ((Object *)(obj)) Remove the unnecessary OBJECT() casts when we already know the pointer is of Object type. Patch created mechanically using spatch with this script: @@ typedef Object; Object *o; @@ - OBJECT(o) + o Acked-by: Cornelia Huck <cohuck@redhat.com> Acked-by: Corey Minyard <cminyard@mvista.com> Acked-by: John Snow <jsnow@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200512070020.22782-3-f4bug@amsat.org> [Trivial rebase conflict in hw/s390x/sclp.c resolved]
Diffstat (limited to 'qom/object.c')
| -rw-r--r-- | qom/object.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qom/object.c b/qom/object.c index e89ffbe3d1..d0be42c8d6 100644 --- a/qom/object.c +++ b/qom/object.c @@ -756,7 +756,7 @@ Object *object_new_with_propv(const char *typename, } } - object_unref(OBJECT(obj)); + object_unref(obj); return obj; error: @@ -1650,7 +1650,7 @@ object_property_add_child(Object *obj, const char *name, assert(!child->parent); - type = g_strdup_printf("child<%s>", object_get_typename(OBJECT(child))); + type = g_strdup_printf("child<%s>", object_get_typename(child)); op = object_property_add(obj, name, type, object_get_child_property, NULL, object_finalize_child_property, child); |