[Spice-devel] [PATCH 16/16] spice_server_add_interface: use local 's' variable

Frediano Ziglio fziglio at redhat.com
Wed Jan 20 07:51:12 PST 2016


> 
> From: Jonathon Jongsma <jjongsma at redhat.com>
> 
> Prefer local argument variable over global 'reds' variable
> ---
>  server/reds.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/server/reds.c b/server/reds.c
> index c112be4..d39f93e 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -3246,9 +3246,9 @@ SPICE_GNUC_VISIBLE int
> spice_server_add_interface(SpiceServer *s,
>          if (inputs_set_tablet(SPICE_CONTAINEROF(sin, SpiceTabletInstance,
>          base)) != 0) {
>              return -1;
>          }
> -        reds_update_mouse_mode(reds);
> -        if (reds->is_client_mouse_allowed) {
> -            inputs_set_tablet_logical_size(reds->monitor_mode.x_res,
> reds->monitor_mode.y_res);
> +        reds_update_mouse_mode(s);
> +        if (s->is_client_mouse_allowed) {
> +            inputs_set_tablet_logical_size(s->monitor_mode.x_res,
> s->monitor_mode.y_res);
>          }
>  
>      } else if (strcmp(interface->type, SPICE_INTERFACE_PLAYBACK) == 0) {

Same comment about 15/16 (rename argument to reds)

Frediano


More information about the Spice-devel mailing list