mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-17 21:26:13 -07:00
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:
parent
bdd8e6b5d8
commit
08f9541dec
11 changed files with 41 additions and 53 deletions
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Input Visitor
|
||||
*
|
||||
* Copyright (C) 2012-2016 Red Hat, Inc.
|
||||
* Copyright IBM, Corp. 2011
|
||||
*
|
||||
* Authors:
|
||||
|
|
@ -154,10 +155,6 @@ static void qmp_input_start_implicit_struct(Visitor *v, void **obj,
|
|||
}
|
||||
}
|
||||
|
||||
static void qmp_input_end_implicit_struct(Visitor *v, Error **errp)
|
||||
{
|
||||
}
|
||||
|
||||
static void qmp_input_start_list(Visitor *v, const char *name, Error **errp)
|
||||
{
|
||||
QmpInputVisitor *qiv = to_qiv(v);
|
||||
|
|
@ -172,8 +169,7 @@ static void qmp_input_start_list(Visitor *v, const char *name, Error **errp)
|
|||
qmp_input_push(qiv, qobj, errp);
|
||||
}
|
||||
|
||||
static GenericList *qmp_input_next_list(Visitor *v, GenericList **list,
|
||||
Error **errp)
|
||||
static GenericList *qmp_input_next_list(Visitor *v, GenericList **list)
|
||||
{
|
||||
QmpInputVisitor *qiv = to_qiv(v);
|
||||
GenericList *entry;
|
||||
|
|
@ -202,7 +198,7 @@ static GenericList *qmp_input_next_list(Visitor *v, GenericList **list,
|
|||
return entry;
|
||||
}
|
||||
|
||||
static void qmp_input_end_list(Visitor *v, Error **errp)
|
||||
static void qmp_input_end_list(Visitor *v)
|
||||
{
|
||||
QmpInputVisitor *qiv = to_qiv(v);
|
||||
|
||||
|
|
@ -353,7 +349,6 @@ QmpInputVisitor *qmp_input_visitor_new(QObject *obj)
|
|||
v->visitor.start_struct = qmp_input_start_struct;
|
||||
v->visitor.end_struct = qmp_input_end_struct;
|
||||
v->visitor.start_implicit_struct = qmp_input_start_implicit_struct;
|
||||
v->visitor.end_implicit_struct = qmp_input_end_implicit_struct;
|
||||
v->visitor.start_list = qmp_input_start_list;
|
||||
v->visitor.next_list = qmp_input_next_list;
|
||||
v->visitor.end_list = qmp_input_end_list;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue