failover: fix indentantion

Once there, remove not needed cast.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20201118083748.1328-3-quintela@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Juan Quintela 2020-11-18 09:37:23 +01:00 committed by Michael S. Tsirkin
parent fe1127da11
commit 1c775d65d4
2 changed files with 17 additions and 20 deletions

View file

@ -824,7 +824,6 @@ static int is_my_primary(void *opaque, QemuOpts *opts, Error **errp)
{
VirtIONet *n = opaque;
int ret = 0;
const char *standby_id = qemu_opt_get(opts, "failover_pair_id");
if (standby_id != NULL && (g_strcmp0(standby_id, n->netclient_name) == 0)) {
@ -857,8 +856,6 @@ static DeviceState *virtio_net_find_primary(VirtIONet *n, Error **errp)
return dev;
}
static DeviceState *virtio_connect_failover_devices(VirtIONet *n,
DeviceState *dev,
Error **errp)
@ -3126,9 +3123,9 @@ static bool failover_replug_primary(VirtIONet *n, Error **errp)
return true;
}
if (!n->primary_device_opts) {
n->primary_device_opts = qemu_opts_from_qdict(
qemu_find_opts("device"),
n->primary_device_dict, errp);
n->primary_device_opts = qemu_opts_from_qdict(qemu_find_opts("device"),
n->primary_device_dict,
errp);
if (!n->primary_device_opts) {
return false;
}

View file

@ -576,7 +576,7 @@ static int is_failover_device(void *opaque, const char *name, const char *value,
Error **errp)
{
if (strcmp(name, "failover_pair_id") == 0) {
QemuOpts *opts = (QemuOpts *)opaque;
QemuOpts *opts = opaque;
if (qdev_should_hide_device(opts)) {
return 1;