qapi: assert list entry has a value

This helps to figure out the expectations.

Backports commit eac8e79ff749fc15e1dca4caccf1f38664ab4915 from qemu
This commit is contained in:
Marc-André Lureau 2018-02-26 05:15:30 -05:00 committed by Lioncash
parent bd469af15f
commit ddc25c8aaf
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -83,6 +83,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);
}