[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 09/27] failover: g_strcmp0() knows how to handle NULL
From: |
Juan Quintela |
Subject: |
[PATCH v2 09/27] failover: g_strcmp0() knows how to handle NULL |
Date: |
Wed, 18 Nov 2020 09:37:30 +0100 |
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
hw/net/virtio-net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index c221671852..e334f05352 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -818,7 +818,7 @@ static int is_my_primary(void *opaque, QemuOpts *opts,
Error **errp)
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))
{
+ if (g_strcmp0(standby_id, n->netclient_name) == 0) {
n->primary_device_id = g_strdup(opts->id);
ret = 1;
}
--
2.26.2
- [PATCH v2 00/27] Virtio net failover fixes, Juan Quintela, 2020/11/18
- [PATCH v2 01/27] migration: Network Failover can't work with a paused guest, Juan Quintela, 2020/11/18
- [PATCH v2 02/27] failover: fix indentantion, Juan Quintela, 2020/11/18
- [PATCH v2 04/27] failover: primary bus is only used once, and where it is set, Juan Quintela, 2020/11/18
- [PATCH v2 03/27] failover: Use always atomics for primary_should_be_hidden, Juan Quintela, 2020/11/18
- [PATCH v2 05/27] failover: Remove unused parameter, Juan Quintela, 2020/11/18
- [PATCH v2 06/27] failover: Remove external partially_hotplugged property, Juan Quintela, 2020/11/18
- [PATCH v2 08/27] failover: Rename bool to failover_primary_hidden, Juan Quintela, 2020/11/18
- [PATCH v2 09/27] failover: g_strcmp0() knows how to handle NULL,
Juan Quintela <=
- [PATCH v2 07/27] failover: qdev_device_add() returns err or dev set, Juan Quintela, 2020/11/18
- [PATCH v2 10/27] failover: Remove primary_device_opts, Juan Quintela, 2020/11/18
- [PATCH v2 11/27] failover: remove standby_id variable, Juan Quintela, 2020/11/18
- [PATCH v2 13/27] failover: Remove memory leak, Juan Quintela, 2020/11/18
- [PATCH v2 12/27] failover: Remove primary_device_dict, Juan Quintela, 2020/11/18
- [PATCH v2 14/27] failover: simplify virtio_net_find_primary(), Juan Quintela, 2020/11/18
- [PATCH v2 15/27] failover: should_be_hidden() should take a bool, Juan Quintela, 2020/11/18
- [PATCH v2 16/27] failover: Rename function to hide_device(), Juan Quintela, 2020/11/18
- [PATCH v2 17/27] failover: virtio_net_connect_failover_devices() does nothing, Juan Quintela, 2020/11/18
- [PATCH v2 18/27] failover: Rename to failover_find_primary_device(), Juan Quintela, 2020/11/18