summaryrefslogtreecommitdiffstats
path: root/qapi
diff options
context:
space:
mode:
authorMarc-André Lureau2016-09-30 11:59:47 +0200
committerMarkus Armbruster2016-10-07 19:22:11 +0200
commiteac8e79ff749fc15e1dca4caccf1f38664ab4915 (patch)
tree569c262e6f5eb60600fd4788f29807a82243b876 /qapi
parentqapi: add assert about root value (diff)
downloadqemu-eac8e79ff749fc15e1dca4caccf1f38664ab4915.tar.gz
qemu-eac8e79ff749fc15e1dca4caccf1f38664ab4915.tar.xz
qemu-eac8e79ff749fc15e1dca4caccf1f38664ab4915.zip
qapi: assert list entry has a value
This helps to figure out the expectations. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20160930095948.3154-3-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/qmp-input-visitor.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/qapi/qmp-input-visitor.c b/qapi/qmp-input-visitor.c
index c7deca95b3..fe097c99b3 100644
--- a/qapi/qmp-input-visitor.c
+++ b/qapi/qmp-input-visitor.c
@@ -84,6 +84,7 @@ static QObject *qmp_input_get_object(QmpInputVisitor *qiv,
assert(qobject_type(qobj) == QTYPE_QLIST);
assert(!name);
ret = qlist_entry_obj(tos->entry);
+ assert(ret);
if (consume) {
tos->entry = qlist_next(tos->entry);
}