diff options
author | Frediano Ziglio <freddy77@gmail.com> | 2020-06-09 18:52:10 +0100 |
---|---|---|
committer | Frediano Ziglio <freddy77@gmail.com> | 2024-06-12 21:35:36 +0100 |
commit | f76ed472a8859333027742f136c6cc5962748770 (patch) | |
tree | af654318af88d14dcd0115c991820d83ac8891ec | |
parent | f0eb8cc57dc10cbe3fa970b5b3f16bea378d9637 (diff) |
Remove one "this"shadow
-rw-r--r-- | server/spicevmc.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/server/spicevmc.cpp b/server/spicevmc.cpp index 3dbc3eaf..0851e4c9 100644 --- a/server/spicevmc.cpp +++ b/server/spicevmc.cpp @@ -575,12 +575,10 @@ void VmcChannelClient::send_item(RedPipeItem *item) void RedVmcChannel::on_connect(RedClient *client, RedStream *stream, int migration, RedChannelCapabilities *caps) { - RedVmcChannel *vmc_channel; SpiceCharDeviceInstance *sin; SpiceCharDeviceInterface *sif; - vmc_channel = this; - sin = vmc_channel->chardev_sin; + sin = chardev_sin; if (rcc) { red_channel_warning(this, @@ -596,15 +594,15 @@ void RedVmcChannel::on_connect(RedClient *client, RedStream *stream, int migrati if (!rcc) { return; } - vmc_channel->queued_data = 0; + queued_data = 0; rcc->ack_zero_messages_window(); if (strcmp(sin->subtype, "port") == 0) { spicevmc_port_send_init(rcc); } - if (!vmc_channel->chardev->client_add(reinterpret_cast<RedCharDeviceClientOpaque *>(client), - FALSE, 0, ~0, ~0, rcc->is_waiting_for_migrate_data())) { + auto opaque_client = reinterpret_cast<RedCharDeviceClientOpaque *>(client); + if (!chardev->client_add(opaque_client, FALSE, 0, ~0, ~0, rcc->is_waiting_for_migrate_data())) { spice_warning("failed to add client to spicevmc"); rcc->disconnect(); return; |