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
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel