aboutsummaryrefslogtreecommitdiff
path: root/qapi/qapi-visit-core.c
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2016-01-29 06:48:59 -0700
committerMarkus Armbruster <armbru@redhat.com>2016-02-08 17:29:57 +0100
commit08f9541dec51700abef0c37994213164ca4e4fc9 (patch)
tree2fbddce86ad35307b616aca8e795965e862b779f /qapi/qapi-visit-core.c
parentbdd8e6b5d8a9def83d491a3f41c10424fc366258 (diff)
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>
Diffstat (limited to 'qapi/qapi-visit-core.c')
-rw-r--r--qapi/qapi-visit-core.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c
index 2be026c7db..f856286461 100644
--- a/qapi/qapi-visit-core.c
+++ b/qapi/qapi-visit-core.c
@@ -38,10 +38,10 @@ void visit_start_implicit_struct(Visitor *v, void **obj, size_t size,
}
}
-void visit_end_implicit_struct(Visitor *v, Error **errp)
+void visit_end_implicit_struct(Visitor *v)
{
if (v->end_implicit_struct) {
- v->end_implicit_struct(v, errp);
+ v->end_implicit_struct(v);
}
}
@@ -50,14 +50,14 @@ void visit_start_list(Visitor *v, const char *name, Error **errp)
v->start_list(v, name, errp);
}
-GenericList *visit_next_list(Visitor *v, GenericList **list, Error **errp)
+GenericList *visit_next_list(Visitor *v, GenericList **list)
{
- return v->next_list(v, list, errp);
+ return v->next_list(v, list);
}
-void visit_end_list(Visitor *v, Error **errp)
+void visit_end_list(Visitor *v)
{
- v->end_list(v, errp);
+ v->end_list(v);
}
bool visit_start_union(Visitor *v, bool data_present, Error **errp)