qapi: Drop unused error argument for list and implicit struct

No backend was setting an error when ending the visit of a list or
implicit struct, or when moving to the next list node.  Make the
callers a bit easier to follow by making this a part of the contract,
and removing the errp argument - callers can then unconditionally end
an object as part of cleanup without having to think about whether a
second error is dominated by a first, because there is no second
error.

A later patch will then tackle the larger task of splitting
visit_end_struct(), which can indeed set an error.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1454075341-13658-24-git-send-email-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
Eric Blake 2016-01-29 06:48:59 -07:00 committed by Markus Armbruster
parent bdd8e6b5d8
commit 08f9541dec
11 changed files with 41 additions and 53 deletions

View file

@ -1,6 +1,7 @@
/*
* Core Definitions for QAPI/QMP Command Registry
*
* Copyright (C) 2012-2016 Red Hat, Inc.
* Copyright IBM, Corp. 2011
*
* Authors:
@ -136,8 +137,7 @@ static void qmp_output_start_list(Visitor *v, const char *name, Error **errp)
qmp_output_push(qov, list);
}
static GenericList *qmp_output_next_list(Visitor *v, GenericList **listp,
Error **errp)
static GenericList *qmp_output_next_list(Visitor *v, GenericList **listp)
{
GenericList *list = *listp;
QmpOutputVisitor *qov = to_qov(v);
@ -152,7 +152,7 @@ static GenericList *qmp_output_next_list(Visitor *v, GenericList **listp,
return list ? list->next : NULL;
}
static void qmp_output_end_list(Visitor *v, Error **errp)
static void qmp_output_end_list(Visitor *v)
{
QmpOutputVisitor *qov = to_qov(v);
qmp_output_pop(qov);