qemu-e2k/net
Markus Armbruster 62a35aaa31 qapi: Use returned bool to check for failure, Coccinelle part
The previous commit enables conversion of

    visit_foo(..., &err);
    if (err) {
        ...
    }

to

    if (!visit_foo(..., errp)) {
        ...
    }

for visitor functions that now return true / false on success / error.
Coccinelle script:

    @@
    identifier fun =~ "check_list|input_type_enum|lv_start_struct|lv_type_bool|lv_type_int64|lv_type_str|lv_type_uint64|output_type_enum|parse_type_bool|parse_type_int64|parse_type_null|parse_type_number|parse_type_size|parse_type_str|parse_type_uint64|print_type_bool|print_type_int64|print_type_null|print_type_number|print_type_size|print_type_str|print_type_uint64|qapi_clone_start_alternate|qapi_clone_start_list|qapi_clone_start_struct|qapi_clone_type_bool|qapi_clone_type_int64|qapi_clone_type_null|qapi_clone_type_number|qapi_clone_type_str|qapi_clone_type_uint64|qapi_dealloc_start_list|qapi_dealloc_start_struct|qapi_dealloc_type_anything|qapi_dealloc_type_bool|qapi_dealloc_type_int64|qapi_dealloc_type_null|qapi_dealloc_type_number|qapi_dealloc_type_str|qapi_dealloc_type_uint64|qobject_input_check_list|qobject_input_check_struct|qobject_input_start_alternate|qobject_input_start_list|qobject_input_start_struct|qobject_input_type_any|qobject_input_type_bool|qobject_input_type_bool_keyval|qobject_input_type_int64|qobject_input_type_int64_keyval|qobject_input_type_null|qobject_input_type_number|qobject_input_type_number_keyval|qobject_input_type_size_keyval|qobject_input_type_str|qobject_input_type_str_keyval|qobject_input_type_uint64|qobject_input_type_uint64_keyval|qobject_output_start_list|qobject_output_start_struct|qobject_output_type_any|qobject_output_type_bool|qobject_output_type_int64|qobject_output_type_null|qobject_output_type_number|qobject_output_type_str|qobject_output_type_uint64|start_list|visit_check_list|visit_check_struct|visit_start_alternate|visit_start_list|visit_start_struct|visit_type_.*";
    expression list args;
    typedef Error;
    Error *err;
    @@
    -    fun(args, &err);
    -    if (err)
    +    if (!fun(args, &err))
         {
             ...
         }

A few line breaks tidied up manually.

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-19-armbru@redhat.com>
2020-07-10 15:18:08 +02:00
..
can qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
Makefile.objs vhost-vdpa: introduce vhost-vdpa net client 2020-07-07 07:59:51 -04:00
announce.c net/announce: Add optional ID 2019-07-02 10:21:06 +08:00
checksum.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
clients.h vhost-vdpa: introduce vhost-vdpa net client 2020-07-07 07:59:51 -04:00
colo-compare.c qapi: Use returned bool to check for failure, Coccinelle part 2020-07-10 15:18:08 +02:00
colo-compare.h colo-compare: use notifier to notify packets comparing result 2018-10-19 11:15:03 +08:00
colo.c net/colo-compare.c: Fix deadlock in compare_chr_send 2020-06-18 21:05:52 +08:00
colo.h net/colo-compare.c: Fix deadlock in compare_chr_send 2020-06-18 21:05:52 +08:00
dump.c qapi: Use returned bool to check for failure, Coccinelle part 2020-07-10 15:18:08 +02:00
eth.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
filter-buffer.c qapi: Use returned bool to check for failure, Coccinelle part 2020-07-10 15:18:08 +02:00
filter-mirror.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
filter-replay.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
filter-rewriter.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
filter.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
hub.c hw/net: Make NetCanReceive() return a boolean 2020-03-31 21:14:35 +08:00
hub.h net: Remove deprecated [hub_id name] tuple of 'hostfwd_add' / 'hostfwd_remove' 2020-03-09 18:44:04 +00:00
l2tpv3.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
net.c vhost-vdpa: introduce vhost-vdpa net client 2020-07-07 07:59:51 -04:00
netmap.c Include qemu/main-loop.h less 2019-08-16 13:31:52 +02:00
queue.c misc: Replace zero-length arrays with flexible array member (automatic) 2020-03-16 22:07:42 +01:00
slirp.c net: Remove deprecated [hub_id name] tuple of 'hostfwd_add' / 'hostfwd_remove' 2020-03-09 18:44:04 +00:00
socket.c net/socket: learn to talk with a unix dgram socket 2019-03-29 15:22:18 +08:00
tap-bsd.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
tap-linux.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
tap-linux.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
tap-solaris.c net/tap-solaris.c: Include qemu-common.h for TFR macro 2020-07-07 12:38:50 +02:00
tap-stub.c net/tap: Replace tap-haiku.c and tap-aix.c by a generic tap-stub.c 2017-05-23 10:10:38 +08:00
tap-win32.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
tap.c tap: allow extended virtio header with hash info 2020-06-18 21:05:50 +08:00
tap_int.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
trace-events colo-compare: Fix memory leak in packet_enqueue() 2020-06-18 21:05:52 +08:00
util.c net: Clean up includes 2016-02-04 17:41:30 +00:00
util.h net: do not depend on slirp internals 2019-01-14 00:44:29 +01:00
vde.c net/vde: print error on vde_open() failure 2018-03-26 14:52:43 +08:00
vhost-user-stub.c vhost-net-user: add stubs for when no virtio-net device is present 2019-02-21 12:28:01 -05:00
vhost-user.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
vhost-vdpa.c vhost-vdpa: introduce vhost-vdpa net client 2020-07-07 07:59:51 -04:00