Hi
On Wed, Dec 16, 2015 at 4:03 PM, Frediano Ziglio <[email protected]> wrote:
> So mainly this function has to return always TRUE (success).
>
> Why not ignoring the return value?
> Or returning void?
>
> Frediano
>
The function that calls this one (dcc_handle_message()) looks like this:
switch (type) {
case SPICE_MSGC_DISPLAY_INIT:
return dcc_handle_init(dcc, (SpiceMsgcDisplayInit *)msg);
case SPICE_MSGC_DISPLAY_STREAM_REPORT:
return dcc_handle_stream_report(dcc, (SpiceMsgcDisplayStreamReport
*)msg);
case SPICE_MSGC_DISPLAY_PREFERRED_COMPRESSION:
return dcc_handle_preferred_compression(dcc,
(SpiceMsgcDisplayPreferredCompression *)msg);
default:
return red_channel_client_handle_message(rcc, size, type, msg);
}
Always returning TRUE is the same, as removing the return from case
SPICE_MSGC_DISPLAY_PREFERRED_COMPRESSION, and return TRUE at the end of
this function.
Always returning TRUE seems nicer to me, because it doesn't break the
symmetry in the switch.
--
Lukas Venhoda
_______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel