All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Andreas Färber" <afaerber@suse.de>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org, anthony@codemonkey.ws
Subject: Re: [Qemu-trivial] [PATCH] qom: Fix object_initialize_with_type() assertion
Date: Mon, 20 Feb 2012 10:11:51 +0100	[thread overview]
Message-ID: <4F420E57.9090804@redhat.com> (raw)
In-Reply-To: <1329695347-9289-1-git-send-email-afaerber@suse.de>

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 <afaerber@suse.de>
> ---
>  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 <pbonzini@redhat.com>

Paolo


WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Andreas Färber" <afaerber@suse.de>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qom: Fix object_initialize_with_type() assertion
Date: Mon, 20 Feb 2012 10:11:51 +0100	[thread overview]
Message-ID: <4F420E57.9090804@redhat.com> (raw)
In-Reply-To: <1329695347-9289-1-git-send-email-afaerber@suse.de>

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 <afaerber@suse.de>
> ---
>  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 <pbonzini@redhat.com>

Paolo

  reply	other threads:[~2012-02-20  9:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-19 23:49 [Qemu-trivial] [PATCH] qom: Fix object_initialize_with_type() assertion Andreas Färber
2012-02-19 23:49 ` [Qemu-devel] " Andreas Färber
2012-02-20  9:11 ` Paolo Bonzini [this message]
2012-02-20  9:11   ` Paolo Bonzini
2012-02-22 18:53 ` [Qemu-trivial] " Anthony Liguori
2012-02-22 18:53   ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F420E57.9090804@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.