qemu/contrib
Markus Armbruster 235e59cf03 qemu-option: Use returned bool to check for failure
The previous commit enables conversion of

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

to

    if (!foo(..., &err)) {
        ...
    }

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

    @@
    identifier fun = {
        opts_do_parse, parse_option_bool, parse_option_number,
        parse_option_size, qemu_opt_parse, qemu_opt_rename, qemu_opt_set,
        qemu_opt_set_bool, qemu_opt_set_number, qemu_opts_absorb_qdict,
        qemu_opts_do_parse, qemu_opts_from_qdict_entry, qemu_opts_set,
        qemu_opts_validate
    };
    expression list args, args2;
    typedef Error;
    Error *err;
    @@
    -    fun(args, &err, args2);
    -    if (err)
    +    if (!fun(args, &err, args2))
         {
             ...
         }

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-15-armbru@redhat.com>
[Conflict with commit 0b6786a9c1 "block/amend: refactor qcow2 amend
options" resolved by rerunning Coccinelle on master's version]
2020-07-10 15:17:35 +02:00
..
elf2dmp contrib/elf2dmp: Build download.o with CURL_CFLAGS 2019-07-22 14:07:39 +01:00
gitdm contrib/gitdm: add China Mobile to the domain map 2019-10-27 19:16:30 +00:00
ivshmem-client Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
ivshmem-server qemu-option: Use returned bool to check for failure 2020-07-10 15:17:35 +02:00
libvhost-user libvhost-user: advertise vring features 2020-06-12 10:17:06 -04:00
rdmacm-mux contrib/rdmacm-mux: Remove superfluous semicolon 2020-02-18 20:20:49 +01:00
systemd contrib: add systemd unit files 2017-12-20 22:29:26 +01:00
vhost-user-blk libvhost-user: advertise vring features 2020-06-12 10:17:06 -04:00
vhost-user-gpu vhost-user-gpu: Release memory returned by vu_queue_pop() with free() 2020-04-15 19:00:39 +01:00
vhost-user-input libvhost-user-glib: fix VugDev main fd cleanup 2020-02-27 03:46:10 -05:00
vhost-user-scsi vhost-user-scsi: fix printf format warning 2019-12-17 19:32:47 +01:00