qapi: Tighten qmp_input_end_list()

The only way that qmp_input_pop() will set errp is if a dictionary
was the most recent thing pushed. Since we don't have any
push(struct)/pop(list) or push(list)/pop(struct) mismatches (such
a mismatch is a programming bug), we therefore cannot set errp
inside qmp_input_end_list(). Make this obvious by
using &error_abort. A later patch will then remove the errp
parameter of qmp_input_pop(), but that will first require the
larger task of splitting visit_end_struct().

Backports commit bdd8e6b5d8a9def83d491a3f41c10424fc366258 from qemu
This commit is contained in:
Eric Blake 2018-02-19 23:44:41 -05:00 committed by Lioncash
parent 1f54314cbb
commit a2fc66a005
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -143,7 +143,7 @@ static void qmp_input_end_struct(Visitor *v, Error **errp)
{
QmpInputVisitor *qiv = to_qiv(v);
qmp_input_pop(qiv, errp);
qmp_input_pop(qiv, &error_abort);
}
static void qmp_input_start_implicit_struct(Visitor *v, void **obj,