qemu/net
Markus Armbruster af175e85f9 error: Eliminate error_propagate() with Coccinelle, part 2
When all we do with an Error we receive into a local variable is
propagating to somewhere else, we can just as well receive it there
right away.  The previous commit did that with a Coccinelle script I
consider fairly trustworthy.  This commit uses the same script with
the matching of return taken out, i.e. we convert

    if (!foo(..., &err)) {
        ...
        error_propagate(errp, err);
        ...
    }

to

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

This is unsound: @err could still be read between afterwards.  I don't
know how to express "no read of @err without an intervening write" in
Coccinelle.  Instead, I manually double-checked for uses of @err.

Suboptimal line breaks tweaked manually.  qdev_realize() simplified
further to placate scripts/checkpatch.pl.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200707160613.848843-36-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
checksum.c
clients.h vhost-vdpa: introduce vhost-vdpa net client 2020-07-07 07:59:51 -04:00
colo-compare.c error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
colo-compare.h
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 error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
eth.c
filter-buffer.c error: Eliminate error_propagate() with Coccinelle, part 1 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
filter-rewriter.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
filter.c qom: Put name parameter before value / visitor parameter 2020-07-10 15:18:08 +02:00
hub.c hw/net: Make NetCanReceive() return a boolean 2020-03-31 21:14:35 +08:00
hub.h
l2tpv3.c
net.c qom: Put name parameter before value / visitor parameter 2020-07-10 15:18:08 +02:00
netmap.c
queue.c
slirp.c
socket.c
tap-bsd.c
tap-linux.c
tap-linux.h
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
tap-win32.c
tap.c error: Eliminate error_propagate() with Coccinelle, part 2 2020-07-10 15:18:08 +02:00
tap_int.h
trace-events colo-compare: Fix memory leak in packet_enqueue() 2020-06-18 21:05:52 +08:00
util.c
util.h
vde.c
vhost-user-stub.c
vhost-user.c
vhost-vdpa.c vhost-vdpa: introduce vhost-vdpa net client 2020-07-07 07:59:51 -04:00