[Spice-devel] [PATCH 07/15] worker: misc. set set_client_capabilities_pending in ctor
Frediano Ziglio
fziglio at redhat.com
Tue Nov 3 08:40:31 PST 2015
>
> 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 at redhat.com>
> > > wrote:
> > > > From: Marc-André Lureau <marcandre.lureau at gmail.com>
> > > >
> > > > 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 at redhat.com>
> > ---
> > 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
>
Merged
Frediano
More information about the Spice-devel
mailing list