On Tue, Mar 15, 2016 at 05:11:36PM -0400, Frediano Ziglio wrote: > > -static void red_channel_client_default_disconnect(RedChannelClient *base) > > +static void red_channel_client_default_disconnect(RedChannelClient *base, > > gpointer cbs_data) > > { > > red_channel_client_disconnect(base); > > } > > @@ -1062,7 +1062,7 @@ RedChannel *red_channel_create(int size, > > > > client_cbs.connect = red_channel_client_default_connect; > > client_cbs.disconnect = red_channel_client_default_disconnect; > > - client_cbs.migrate = red_channel_client_default_migrate; > > + client_cbs.migrate = > > (channel_client_migrate_proc)red_channel_client_default_migrate; > > > > I don't like these kind of cast. Why don't you add a parameter (unused) > to these functions? red_channel_client_default_migrate() is not used only as a ClientCbs::migrate vfunc, it's also called a few times in other code (red_migrate_display() for example). red_channel_client_default_migrate(rcc, NULL) did not look so great there, and I prefer to have a cast rather than an intermediate function with the right number of args calling directly the real function with one arg less. Christophe
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel