]> Git Repo - qemu.git/commitdiff
failover: g_strcmp0() knows how to handle NULL
authorJuan Quintela <[email protected]>
Wed, 18 Nov 2020 08:37:30 +0000 (09:37 +0100)
committerMichael S. Tsirkin <[email protected]>
Tue, 8 Dec 2020 18:48:57 +0000 (13:48 -0500)
Signed-off-by: Juan Quintela <[email protected]>
Message-Id: <20201118083748[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
hw/net/virtio-net.c

index c221671852e0ffed6fe380e0c2845714108ddb7a..e334f053528664ecc54ebb7dc6ad031376bd6630 100644 (file)
@@ -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;
     }
This page took 0.02983 seconds and 4 git commands to generate.