[Spice-devel] [PATCH] avoid getting channel from client
Christophe Fergeau
cfergeau at redhat.com
Wed May 25 13:33:00 UTC 2016
Hey,
On Wed, May 25, 2016 at 12:58:48PM +0100, Frediano Ziglio wrote:
> ---
> server/inputs-channel-client.c | 2 --
> server/inputs-channel.c | 7 +------
> server/inputs-channel.h | 1 -
> 3 files changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/server/inputs-channel-client.c b/server/inputs-channel-client.c
> index f9dd6b2..2f8acec 100644
> --- a/server/inputs-channel-client.c
> +++ b/server/inputs-channel-client.c
> @@ -54,9 +54,7 @@ void inputs_channel_client_send_migrate_data(RedChannelClient *rcc,
> RedPipeItem *item)
> {
> InputsChannelClient *icc = SPICE_CONTAINEROF(rcc, InputsChannelClient, base);
> - InputsChannel *inputs = (InputsChannel*)rcc->channel;
>
> - inputs_channel_set_src_during_migrate(inputs, FALSE);
> red_channel_client_init_send_data(rcc, SPICE_MSG_MIGRATE_DATA, item);
>
> spice_marshaller_add_uint32(m, SPICE_MIGRATE_DATA_INPUTS_MAGIC);
> diff --git a/server/inputs-channel.c b/server/inputs-channel.c
> index bdb8d6f..2481b88 100644
> --- a/server/inputs-channel.c
> +++ b/server/inputs-channel.c
> @@ -257,6 +257,7 @@ static void inputs_channel_send_item(RedChannelClient *rcc, RedPipeItem *base)
> red_channel_client_init_send_data(rcc, SPICE_MSG_INPUTS_MOUSE_MOTION_ACK, base);
> break;
> case RED_PIPE_ITEM_MIGRATE_DATA:
> + ((InputsChannel*)rcc->channel)->src_during_migrate = FALSE;
This was preexisting in the code, so no need to change the patch or send
a followup, but imo it's more readable to avoid casts in the left-side
of expressions like this one.
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160525/f43fda1a/attachment.sig>
More information about the Spice-devel
mailing list