qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 26/31] qapi: Tighten qmp_input_end_list()


From: Markus Armbruster
Subject: [Qemu-devel] [PULL 26/31] qapi: Tighten qmp_input_end_list()
Date: Tue, 9 Feb 2016 12:37:58 +0100

From: Eric Blake <address@hidden>

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().

Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
---
 qapi/qmp-input-visitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qapi/qmp-input-visitor.c b/qapi/qmp-input-visitor.c
index 92eee26..4563c20 100644
--- a/qapi/qmp-input-visitor.c
+++ b/qapi/qmp-input-visitor.c
@@ -206,7 +206,7 @@ static void qmp_input_end_list(Visitor *v, Error **errp)
 {
     QmpInputVisitor *qiv = to_qiv(v);
 
-    qmp_input_pop(qiv, errp);
+    qmp_input_pop(qiv, &error_abort);
 }
 
 static void qmp_input_get_next_type(Visitor *v, const char *name, QType *type,
-- 
2.4.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]