failover: simplify virtio_net_find_primary()
commit7cf05b7ed8e84e89b873701e3dfcd56aa81b2d13
authorJuan Quintela <quintela@redhat.com>
Wed, 18 Nov 2020 08:37:35 +0000 (18 09:37 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 8 Dec 2020 18:48:57 +0000 (8 13:48 -0500)
tree74ec70be84747fe92260942e9be730bacc34f296
parent7b3dc2f8c0b817bbe78ba347130b3c99fe2c4470
failover: simplify virtio_net_find_primary()

a - is_my_primary() never sets one error
b - If we return 1, primary_device_id is always set

Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20201118083748.1328-15-quintela@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/net/virtio-net.c