mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
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]
This commit is contained in:
parent
96449e4a30
commit
688ffbb4f7
7 changed files with 11 additions and 12 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue