qmp-input: Clean up stack handling
commitb471d012e5d7bec1d2272738141e121b5581fcdf
authorEric Blake <eblake@redhat.com>
Thu, 28 Apr 2016 21:45:12 +0000 (28 15:45 -0600)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 12 May 2016 07:47:54 +0000 (12 09:47 +0200)
tree82423db170087dc37fb6becce39c5f2fc42b9b93
parent42a502a7a60632234f0dd5028924926a7eac6c94
qmp-input: Clean up stack handling

Management of the top of stack was a bit verbose; creating a
temporary variable and adding some comments makes the existing
code more legible before the next few patches improve things.
No semantic changes other than asserting that we are always
visiting a QObject, and not a NULL value.  In particular, the
check for 'name && qobject_type(qobj) == QTYPE_QDICT)' is a
bit overkill (a dict visit should always have a name); a later
patch revisits that, while this patch is only changing one
layer of indentation due to dropping 'if (qobj)'.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1461879932-9020-5-git-send-email-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
qapi/qmp-input-visitor.c