aboutsummaryrefslogtreecommitdiff
path: root/target/i386
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2022-11-21 09:50:53 +0100
committerMarkus Armbruster <armbru@redhat.com>2022-12-14 16:19:35 +0100
commitd1c81c34964193bc62167ee60bf70b203e763699 (patch)
tree702219e0294f547c703577e43bd88a3062785386 /target/i386
parentf560eb1f0a73b786a9c306d453d9e2e846ecb3e7 (diff)
downloadqemu-d1c81c34964193bc62167ee60bf70b203e763699.zip
qemu-d1c81c34964193bc62167ee60bf70b203e763699.tar.gz
qemu-d1c81c34964193bc62167ee60bf70b203e763699.tar.bz2
qapi: Use returned bool to check for failure (again)
Commit 012d4c96e2 changed the visitor functions taking Error ** to return bool instead of void, and the commits following it used the new return value to simplify error checking. Since then a few more uses in need of the same treatment crept in. Do that. All pretty mechanical except for * balloon_stats_get_all() This is basically the same transformation commit 012d4c96e2 applied to the virtual walk example in include/qapi/visitor.h. * set_max_queue_size() Additionally replace "goto end of function" by return. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20221121085054.683122-10-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'target/i386')
-rw-r--r--target/i386/kvm/kvm.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index a213209..0ab4e07 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -5689,7 +5689,6 @@ static void kvm_arch_set_notify_window(Object *obj, Visitor *v,
Error **errp)
{
KVMState *s = KVM_STATE(obj);
- Error *error = NULL;
uint32_t value;
if (s->fd != -1) {
@@ -5697,9 +5696,7 @@ static void kvm_arch_set_notify_window(Object *obj, Visitor *v,
return;
}
- visit_type_uint32(v, name, &value, &error);
- if (error) {
- error_propagate(errp, error);
+ if (!visit_type_uint32(v, name, &value, errp)) {
return;
}