OSDN Git Service

qapi: Use returned bool to check for failure (again)
authorMarkus Armbruster <armbru@redhat.com>
Mon, 21 Nov 2022 08:50:53 +0000 (09:50 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Wed, 14 Dec 2022 15:19:35 +0000 (16:19 +0100)
commitd1c81c34964193bc62167ee60bf70b203e763699
tree702219e0294f547c703577e43bd88a3062785386
parentf560eb1f0a73b786a9c306d453d9e2e846ecb3e7
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>
accel/kvm/kvm-all.c
hw/core/qdev-properties-system.c
hw/i386/pc.c
hw/virtio/virtio-balloon.c
hw/virtio/virtio-mem.c
net/colo-compare.c
target/i386/kvm/kvm.c
util/thread-context.c