[Spice-devel] [PATCH spice-server 08/22] reds: use bool for RedsState::src_do_seamless_migrate

Christophe Fergeau cfergeau at redhat.com
Fri Jun 16 13:17:49 UTC 2017


On Fri, Jun 16, 2017 at 10:13:20AM +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  server/reds-private.h | 4 ++--
>  server/reds.c         | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/server/reds-private.h b/server/reds-private.h
> index 37af888..68c3c45 100644
> --- a/server/reds-private.h
> +++ b/server/reds-private.h
> @@ -94,8 +94,8 @@ struct RedsState {
>  
>      int mig_inprogress;
>      int expect_migrate;
> -    int src_do_seamless_migrate; /* per migration. Updated after the migration handshake
> -                                    between the 2 servers */
> +    bool src_do_seamless_migrate; /* per migration. Updated after the migration handshake
> +                                     between the 2 servers */
>      bool dst_do_seamless_migrate; /* per migration. Updated after the migration handshake
>                                       between the 2 servers */
>      GList *mig_target_clients;
> diff --git a/server/reds.c b/server/reds.c
> index 168b3d8..b0478f2 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -1158,7 +1158,7 @@ void reds_on_main_agent_data(RedsState *reds, MainChannelClient *mcc, const void
>  
>  void reds_on_main_migrate_connected(RedsState *reds, int seamless)
>  {
> -    reds->src_do_seamless_migrate = seamless;
> +    reds->src_do_seamless_migrate = !!seamless;

The only caller passes a bool, dunno if you change 'int seamless' to
bool later? What was your criterion for what to change/not to change?

Christophe

>      if (reds->mig_wait_connect) {
>          reds_mig_cleanup(reds);
>      }
> -- 
> 2.9.4
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170616/ffa1ae72/attachment.sig>


More information about the Spice-devel mailing list