All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Markus Armbruster" <armbru@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH 4/4] qobject-input-visitor: Catch misuse of end_struct vs. end_list
Date: Thu, 27 Apr 2017 08:13:13 -0500	[thread overview]
Message-ID: <ef786534-615d-da52-e506-78a0a413f18d@redhat.com> (raw)
In-Reply-To: <87lgqm83yl.fsf@dusky.pond.sub.org>

[-- Attachment #1: Type: text/plain, Size: 586 bytes --]

On 04/27/2017 06:50 AM, Markus Armbruster wrote:

>>>>
>>>> It would be more obvious with a check for qobject_type(tos->obj), no?
>>>
>>> --verbose?
>>>
>>
>> Instead of assert(tos->h) assert(qobject_type(tos->obj) == QTYPE_QDICT) ?
> 
> The two conditions imply each other.  We can assert either one, or even
> both.  Eric, got a preference?

Asserting both might make it easier to come up to speed when reading the
code a year from now.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2017-04-27 13:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-27  8:41 [Qemu-devel] [PATCH 0/4] qapi: Loose ends Markus Armbruster
2017-04-27  8:41 ` [Qemu-devel] [PATCH 1/4] qmp: Improve QMP dispatch error messages Markus Armbruster
2017-04-27  9:06   ` Marc-André Lureau
2017-05-02 13:14   ` Philippe Mathieu-Daudé
2017-04-27  8:41 ` [Qemu-devel] [PATCH 2/4] qobject-input-visitor: Document full_name_nth() Markus Armbruster
2017-04-27  9:06   ` Marc-André Lureau
2017-04-27  8:41 ` [Qemu-devel] [PATCH 3/4] qapi: Document intended use of @name within alternate visits Markus Armbruster
2017-04-27  9:06   ` Marc-André Lureau
2017-04-27  8:41 ` [Qemu-devel] [PATCH 4/4] qobject-input-visitor: Catch misuse of end_struct vs. end_list Markus Armbruster
2017-04-27  9:06   ` Marc-André Lureau
2017-04-27 10:49     ` Markus Armbruster
2017-04-27 10:56       ` Marc-André Lureau
2017-04-27 11:50         ` Markus Armbruster
2017-04-27 13:13           ` Eric Blake [this message]
2017-04-27 14:02             ` Markus Armbruster

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=ef786534-615d-da52-e506-78a0a413f18d@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@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.