49 lines
1.8 KiB
Diff
49 lines
1.8 KiB
Diff
From 97b7137652441a3d458f3d9f7bc326047de185c3 Mon Sep 17 00:00:00 2001
|
|
From: Laurent Vivier <lvivier@redhat.com>
|
|
Date: Thu, 25 Feb 2021 23:14:28 -0500
|
|
Subject: [PATCH 31/54] failover: g_strcmp0() knows how to handle NULL
|
|
|
|
RH-Author: Laurent Vivier <lvivier@redhat.com>
|
|
Message-id: <20210225231447.2187738-9-lvivier@redhat.com>
|
|
Patchwork-id: 101249
|
|
O-Subject: [RHEL-AV-8.4.0 qemu-kvm PATCH v2 08/27] failover: g_strcmp0() knows how to handle NULL
|
|
Bugzilla: 1819991
|
|
RH-Acked-by: Juan Quintela <quintela@redhat.com>
|
|
RH-Acked-by: Jens Freimann <jfreimann@redhat.com>
|
|
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
|
From: Juan Quintela <quintela@redhat.com>
|
|
|
|
BZ: https://bugzilla.redhat.com/1819991
|
|
BRANCH: rhel-av-8.4.0
|
|
UPSTREAM: Merged
|
|
|
|
Signed-off-by: Juan Quintela <quintela@redhat.com>
|
|
Message-Id: <20201118083748.1328-10-quintela@redhat.com>
|
|
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
(cherry picked from commit 518eda9fda49da910d47f5baf66a1c0d1d30cebd)
|
|
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
|
|
Signed-off-by: Danilo C. L. de Paula <ddepaula@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.27.0
|
|
|