qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] qom/object: pass (Object *) to object_initialize_with_type()


From: Paolo Bonzini
Subject: Re: [PATCH] qom/object: pass (Object *) to object_initialize_with_type()
Date: Thu, 21 May 2020 16:46:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

On 12/05/20 19:31, Masahiro Yamada wrote:
> object_new_with_type() already passes (Object *) pointer.
> Avoid casting back and forth.
> 
> Signed-off-by: Masahiro Yamada <address@hidden>
> ---
> 
>  qom/object.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/qom/object.c b/qom/object.c
> index e4085d8ae2..9d1a918e42 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -495,10 +495,8 @@ static void object_class_property_init_all(Object *obj)
>      }
>  }
>  
> -static void object_initialize_with_type(void *data, size_t size, TypeImpl 
> *type)
> +static void object_initialize_with_type(Object *obj, size_t size, TypeImpl 
> *type)
>  {
> -    Object *obj = data;
> -
>      type_initialize(type);
>  
>      g_assert(type->instance_size >= sizeof(Object));
> 

Queued, thanks.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]