aboutsummaryrefslogtreecommitdiff
path: root/monitor/misc.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-05-12 09:00:19 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-05-15 07:08:14 +0200
commit688ffbb4f72bf9a75c7ff3a899a9617de61d5fd6 (patch)
tree98137bc80565df6a363847506617f177167122c3 /monitor/misc.c
parent96449e4a30a56e3303d6d0407aca130c71671754 (diff)
downloadqemu-688ffbb4f72bf9a75c7ff3a899a9617de61d5fd6.zip
qemu-688ffbb4f72bf9a75c7ff3a899a9617de61d5fd6.tar.gz
qemu-688ffbb4f72bf9a75c7ff3a899a9617de61d5fd6.tar.bz2
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 'monitor/misc.c')
-rw-r--r--monitor/misc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/monitor/misc.c b/monitor/misc.c
index 9723b46..f5207cd 100644
--- a/monitor/misc.c
+++ b/monitor/misc.c
@@ -1837,8 +1837,7 @@ void object_add_completion(ReadLineState *rs, int nb_args, const char *str)
static int qdev_add_hotpluggable_device(Object *obj, void *opaque)
{
GSList **list = opaque;
- DeviceState *dev = (DeviceState *)object_dynamic_cast(OBJECT(obj),
- TYPE_DEVICE);
+ DeviceState *dev = (DeviceState *)object_dynamic_cast(obj, TYPE_DEVICE);
if (dev == NULL) {
return 0;