Re: [PATCH spice-server] Use variable values instead of computing again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ack,
Pavel


(there are many places where the value can be saved and used)

On Fri, 2017-03-03 at 15:05 +0000, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/dcc.c                 | 4 ++--
>  server/main-channel-client.c | 4 ++--
>  server/main-channel.c        | 2 +-
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/server/dcc.c b/server/dcc.c
> index 898e074..f42cac0 100644
> --- a/server/dcc.c
> +++ b/server/dcc.c
> @@ -563,7 +563,7 @@ void dcc_start(DisplayChannelClient *dcc)
>      DisplayChannel *display = DCC_TO_DC(dcc);
>      RedChannelClient *rcc = RED_CHANNEL_CLIENT(dcc);
>  
> -    red_channel_client_push_set_ack(RED_CHANNEL_CLIENT(dcc));
> +    red_channel_client_push_set_ack(rcc);
>  
>      if (red_channel_client_is_waiting_for_migrate_data(rcc))
>          return;
> @@ -571,7 +571,7 @@ void dcc_start(DisplayChannelClient *dcc)
>      if (!display_channel_client_wait_for_init(dcc))
>          return;
>  
> -    red_channel_client_ack_zero_messages_window(RED_CHANNEL_CLIENT(
> dcc));
> +    red_channel_client_ack_zero_messages_window(rcc);
>      if (display->priv->surfaces[0].context.canvas) {
>          display_channel_current_flush(display, 0);
>          red_channel_client_pipe_add_type(rcc,
> RED_PIPE_ITEM_TYPE_INVAL_PALETTE_CACHE);
> diff --git a/server/main-channel-client.c b/server/main-channel-
> client.c
> index 2b68407..f6f7e87 100644
> --- a/server/main-channel-client.c
> +++ b/server/main-channel-client.c
> @@ -510,7 +510,7 @@ void
> main_channel_client_handle_pong(MainChannelClient *mcc, SpiceMsgPing
> *ping,
>                             "bandwidth", mcc->priv->latency,
> roundtrip);
>              mcc->priv->latency = 0;
>              mcc->priv->net_test_stage = NET_TEST_STAGE_INVALID;
> -            red_channel_client_start_connectivity_monitoring(RED_CH
> ANNEL_CLIENT(mcc),
> +            red_channel_client_start_connectivity_monitoring(rcc,
>                                                               CLIENT
> _CONNECTIVITY_TIMEOUT);
>              break;
>          }
> @@ -522,7 +522,7 @@ void
> main_channel_client_handle_pong(MainChannelClient *mcc, SpiceMsgPing
> *ping,
>                         mcc->priv->bitrate_per_sec,
>                         (double)mcc->priv->bitrate_per_sec / 1024 /
> 1024,
>                         main_channel_client_is_low_bandwidth(mcc) ?
> " LOW BANDWIDTH" : "");
> -        red_channel_client_start_connectivity_monitoring(RED_CHANNE
> L_CLIENT(mcc),
> +        red_channel_client_start_connectivity_monitoring(rcc,
>                                                           CLIENT_CON
> NECTIVITY_TIMEOUT);
>          break;
>      default:
> diff --git a/server/main-channel.c b/server/main-channel.c
> index 307c80f..dd89489 100644
> --- a/server/main-channel.c
> +++ b/server/main-channel.c
> @@ -87,7 +87,7 @@ static void
> main_channel_push_channels(MainChannelClient *mcc)
>                     "during migration");
>          return;
>      }
> -    red_channel_client_pipe_add_type(RED_CHANNEL_CLIENT(mcc),
> RED_PIPE_ITEM_TYPE_MAIN_CHANNELS_LIST);
> +    red_channel_client_pipe_add_type(rcc,
> RED_PIPE_ITEM_TYPE_MAIN_CHANNELS_LIST);
>  }
>  
>  void main_channel_push_mouse_mode(MainChannel *main_chan, int
> current_mode,
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]