qemu-e2k/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
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
colo.h
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
filter-replay.c
filter-rewriter.c
filter.c qom: Put name parameter before value / visitor parameter 2020-07-10 15:18:08 +02:00
hub.c
hub.h
l2tpv3.c
Makefile.objs vhost-vdpa: introduce vhost-vdpa net client 2020-07-07 07:59:51 -04:00
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_int.h
tap-bsd.c
tap-linux.c
tap-linux.h
tap-solaris.c
tap-stub.c
tap-win32.c
tap.c error: Eliminate error_propagate() with Coccinelle, part 2 2020-07-10 15:18:08 +02:00
trace-events
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