diff options
author | Markus Armbruster | 2020-07-07 18:05:47 +0200 |
---|---|---|
committer | Markus Armbruster | 2020-07-10 15:18:08 +0200 |
commit | 14217038bc9e36246d311fa8e026a01a5d7bbd42 (patch) | |
tree | c93af897bda7a8789e91d09eb89a035bbe4bcff0 /hw/net | |
parent | qapi: Use returned bool to check for failure, Coccinelle part (diff) | |
download | qemu-14217038bc9e36246d311fa8e026a01a5d7bbd42.tar.gz qemu-14217038bc9e36246d311fa8e026a01a5d7bbd42.tar.xz qemu-14217038bc9e36246d311fa8e026a01a5d7bbd42.zip |
qapi: Use returned bool to check for failure, manual part
The previous commit used Coccinelle to convert from checking the Error
object to checking the return value. Convert a few more manually.
Also tweak control flow in places to conform to the conventional "if
error bail out" pattern.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20200707160613.848843-20-armbru@redhat.com>
Diffstat (limited to 'hw/net')
-rw-r--r-- | hw/net/ne2000-isa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/net/ne2000-isa.c b/hw/net/ne2000-isa.c index 765bcd1f0b..0594abd93a 100644 --- a/hw/net/ne2000-isa.c +++ b/hw/net/ne2000-isa.c @@ -113,8 +113,8 @@ static void isa_ne2000_set_bootindex(Object *obj, Visitor *v, int32_t boot_index; Error *local_err = NULL; - if (!visit_type_int32(v, name, &boot_index, &local_err)) { - goto out; + if (!visit_type_int32(v, name, &boot_index, errp)) { + return; } /* check whether bootindex is present in fw_boot_order list */ check_boot_index(boot_index, &local_err); |