Received: from eggs.gnu.org ([2001:4830:134:3::10]:41522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aP9QP-0003or-AW for qemu-devel@nongnu.org; Fri, 29 Jan 2016 08:49:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aP9QO-0001ML-Gu for qemu-devel@nongnu.org; Fri, 29 Jan 2016 08:49:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aP9QO-0001M6-Cd for qemu-devel@nongnu.org; Fri, 29 Jan 2016 08:49:20 -0500 From: Eric Blake Date: Fri, 29 Jan 2016 06:48:58 -0700 Message-Id: <1454075341-13658-23-git-send-email-eblake@redhat.com> In-Reply-To: <1454075341-13658-1-git-send-email-eblake@redhat.com> References: <1454075341-13658-1-git-send-email-eblake@redhat.com> Subject: [Qemu-devel] [PATCH v10 22/25] qapi: Tighten qmp_input_end_list() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, armbru@redhat.com, Michael Roth 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 --- v10: new patch, split out from 18/37 --- 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 bf25249..ce3c0d6 100644 --- a/qapi/qmp-input-visitor.c +++ b/qapi/qmp-input-visitor.c @@ -205,7 +205,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.5.0