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

Submitted by Frediano Ziglio on June 16, 2017, 9:13 a.m.

Details

Message ID 20170616091334.31475-11-fziglio@redhat.com
State New
Headers show
Series "reds: Use bool for boolean types" ( rev: 6 5 4 3 2 1 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio June 16, 2017, 9:13 a.m.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
 server/reds-private.h | 2 +-
 server/reds.c         | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

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);