[Spice-devel] [PATCH 05/18] Avoid useless check
Pavel Grunt
pgrunt at redhat.com
Mon Sep 26 09:00:28 UTC 2016
On Mon, 2016-09-26 at 09:12 +0100, Frediano Ziglio wrote:
> If channel is not connected red_channel_pipes_new_add_push will
> do nothing.
red_channel_pipes_new_add_push() does it through "foreach" over its
clients. I would prefer to keep the explicit check, imho it is more
readable.
Pavel
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> server/inputs-channel.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/server/inputs-channel.c b/server/inputs-channel.c
> index 840d5e9..e3a940c 100644
> --- a/server/inputs-channel.c
> +++ b/server/inputs-channel.c
> @@ -518,8 +518,7 @@ static void inputs_migrate(RedChannelClient
> *rcc)
>
> static void inputs_channel_push_keyboard_modifiers(InputsChannel
> *inputs, uint8_t modifiers)
> {
> - if (!inputs || !red_channel_is_connected(&inputs->base) ||
> - inputs->src_during_migrate) {
> + if (!inputs || inputs->src_during_migrate) {
> return;
> }
> red_channel_pipes_new_add_push(&inputs->base,
>
More information about the Spice-devel
mailing list