diff options
author | Juan Quintela <quintela@redhat.com> | 2020-11-18 09:37:30 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2020-12-08 13:48:57 -0500 |
commit | 518eda9fda49da910d47f5baf66a1c0d1d30cebd (patch) | |
tree | 31676ac1d13e3f0041175c2c993da34df07b47ef /hw/net | |
parent | e2bde83e23d3cfc1d90911c74500fd2e3b0b04fa (diff) | |
download | qemu-518eda9fda49da910d47f5baf66a1c0d1d30cebd.zip qemu-518eda9fda49da910d47f5baf66a1c0d1d30cebd.tar.gz qemu-518eda9fda49da910d47f5baf66a1c0d1d30cebd.tar.bz2 |
failover: g_strcmp0() knows how to handle NULL
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>
Diffstat (limited to 'hw/net')
-rw-r--r-- | hw/net/virtio-net.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index c221671..e334f05 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; } |