Re: [spice-server v3 10/10] sound: Convert SndChannelClient to RedChannelClient

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

 



I've pushed the whole series now.

Christophe

On Mon, Jan 30, 2017 at 01:37:00PM +0100, Christophe Fergeau wrote:
> On Mon, Jan 30, 2017 at 07:02:04AM -0500, Frediano Ziglio wrote:
> > 
> > > 
> > > Fwiw, see the merged patch attached to this mail. Frediano feels
> > > strongly that these should be merged, so I'll most likely go with this
> > > version.
> > > 
> > > Christophe
> > > 
> > 
> > I noted this weird hunk (that don't apply on top of previous series
> > without last 2 patches):
> > 
> > @@ -645,9 +575,9 @@ static void snd_send(SndChannelClient * client)
> >  {
> >      RedChannelClient *rcc;
> > 
> > -    g_return_if_fail(client != NULL);
> > +    g_return_if_fail(RED_IS_CHANNEL_CLIENT(client));
> > 
> > -    rcc = client->channel_client;
> > +    rcc = RED_CHANNEL_CLIENT(client);
> >      if (!red_channel_client_pipe_is_empty(rcc) || !client->command) {
> >          return;
> >      }
> > 
> > 
> > I think would be better:
> > 
> >      RedChannelClient *rcc;
> > 
> >      rcc = RED_CHANNEL_CLIENT(client);
> >      if (!rcc || !red_channel_client_pipe_is_empty(rcc) || !client->command) {
> >          return;
> >      }
> > 
> > no reason to check for type twice, RED_CHANNEL_CLIENT handle NULL cases with
> > warning if needed.
> > 
> > Or just remove the check at all...
> 
> I *think* this can never be called with a NULL pointer, but I'm not 100%
> sure, so I prefer to have a loud warning and no crash for now if we are
> called with a NULL client.
> 
> Christophe



> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: signature.asc
Description: PGP signature

_______________________________________________
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]