qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [PATCH] qom: Fix object_initialize_with_type() assert


From: Paolo Bonzini
Subject: Re: [Qemu-trivial] [PATCH] qom: Fix object_initialize_with_type() assertion
Date: Mon, 20 Feb 2012 10:11:51 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1

On 02/20/2012 12:49 AM, Andreas Färber wrote:
> Assert the object is at least sizeof(Object), not sizeof(ObjectClass).
> 
> Signed-off-by: Andreas Färber <address@hidden>
> ---
>  qom/object.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/qom/object.c b/qom/object.c
> index b1ead15..dbfd6a4 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -262,7 +262,7 @@ void object_initialize_with_type(void *data, TypeImpl 
> *type)
>      Object *obj = data;
>  
>      g_assert(type != NULL);
> -    g_assert(type->instance_size >= sizeof(ObjectClass));
> +    g_assert(type->instance_size >= sizeof(Object));
>  
>      type_class_init(type);
>      g_assert(type->abstract == false);

Reviewed-by: Paolo Bonzini <address@hidden>

Paolo



reply via email to

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