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

Frediano Ziglio fziglio at redhat.com
Fri Jun 16 09:13:22 UTC 2017


Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/reds-private.h | 2 +-
 server/reds.c         | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/server/reds-private.h b/server/reds-private.h
index 06fd596..36800c2 100644
--- a/server/reds-private.h
+++ b/server/reds-private.h
@@ -92,7 +92,7 @@ struct RedsState {
                                          which the src waits for their disconnection */
 
 
-    int mig_inprogress;
+    bool mig_inprogress;
     bool expect_migrate;
     bool src_do_seamless_migrate; /* per migration. Updated after the migration handshake
                                      between the 2 servers */
diff --git a/server/reds.c b/server/reds.c
index 3846a33..f497352 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -429,7 +429,7 @@ static void reds_mig_cleanup(RedsState *reds)
                 }
             }
         }
-        reds->mig_inprogress = FALSE;
+        reds->mig_inprogress = false;
         reds->mig_wait_connect = FALSE;
         reds->mig_wait_disconnect = FALSE;
         reds_core_timer_cancel(reds, reds->mig_timer);
@@ -1744,7 +1744,7 @@ static void reds_handle_main_link(RedsState *reds, RedLinkInfo *link)
         mig_target = TRUE;
     }
 
-    reds->mig_inprogress = FALSE;
+    reds->mig_inprogress = false;
     reds->mig_wait_connect = FALSE;
     reds->mig_wait_disconnect = FALSE;
 
@@ -2926,7 +2926,7 @@ static void reds_mig_started(RedsState *reds)
     spice_debug("trace");
     spice_assert(reds->config->mig_spice);
 
-    reds->mig_inprogress = TRUE;
+    reds->mig_inprogress = true;
     reds->mig_wait_connect = TRUE;
     reds_core_timer_start(reds, reds->mig_timer, MIGRATE_TIMEOUT);
 }
@@ -2976,7 +2976,7 @@ static void reds_mig_finished(RedsState *reds, int completed)
 {
     spice_debug("trace");
 
-    reds->mig_inprogress = TRUE;
+    reds->mig_inprogress = true;
 
     if (reds->src_do_seamless_migrate && completed) {
         reds_migrate_channels_seamless(reds);
-- 
2.9.4



More information about the Spice-devel mailing list