Re: [PATCH 07/15] worker: misc. set set_client_capabilities_pending in ctor

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

 



On Tue, Nov 03, 2015 at 11:13:05AM -0500, Frediano Ziglio wrote:
> > 
> > On Tue, Nov 3, 2015 at 11:20 AM, Frediano Ziglio <fziglio@xxxxxxxxxx> wrote:
> > > From: Marc-André Lureau <marcandre.lureau@xxxxxxxxx>
> > >
> > > Not really necessary, but probably better than FALSE anyway.
> > > ---
> > >  server/red_worker.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/server/red_worker.c b/server/red_worker.c
> > > index fbcab6d..9057cf5 100644
> > > --- a/server/red_worker.c
> > > +++ b/server/red_worker.c
> > > @@ -10598,6 +10598,7 @@ RedWorker* red_worker_new(QXLInstance *qxl,
> > > RedDispatcher *red_dispatcher)
> > >  #endif
> > >      red_init_zlib(worker);
> > >      worker->event_timeout = INF_EVENT_WAIT;
> > > +    worker->set_client_capabilities_pending = TRUE;
> > >
> > >      return worker;
> > >  }
> > > --
> > > 2.4.3
> > >
> > 
> > Is it used elsewhere than  in guest_set_client_capabilities()?
> > If not, inside guest_set_client_capabilities() there is nothing
> > depending on this var, it's set as TRUE when the worker is not running
> > and set as FALSE in the end of the function ...
> > Please, let me know if I am missing something here, but for now Nack.
> > 
> 
> Good catch. I'll reply with this patch
> 
> Subject: [PATCH] worker: remove only assigned set_client_capabilities_pending field
> 
> This field is only assigned and never readed so can be removed.
> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/red_worker.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/server/red_worker.c b/server/red_worker.c
> index 9111e13..9b4f563 100644
> --- a/server/red_worker.c
> +++ b/server/red_worker.c
> @@ -562,7 +562,6 @@ typedef struct RedWorker {
>  #endif
>  
>      int driver_cap_monitors_config;
> -    int set_client_capabilities_pending;
>  
>      FILE *record_fd;
>  } RedWorker;
> @@ -9447,7 +9446,6 @@ static void guest_set_client_capabilities(RedWorker *worker)
>          ((a)[(c) / 8] &= ~(1 << ((c) % 8)))
>  
>      if (!worker->running) {
> -        worker->set_client_capabilities_pending = 1;
>          return;
>      }
>      if ((worker->display_channel == NULL) ||
> @@ -9467,7 +9465,6 @@ static void guest_set_client_capabilities(RedWorker *worker)
>          }
>          worker->qxl->st->qif->set_client_capabilities(worker->qxl, TRUE, caps);
>      }
> -    worker->set_client_capabilities_pending = 0;
>  }
>  
>  static void handle_new_display_channel(RedWorker *worker, RedClient *client, RedsStream *stream,

Looks good to me.

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://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]