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

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

Details

Message ID 20170616091334.31475-13-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 | 4 ++--
 server/reds.c         | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

Patch hide | download patch | download mbox

diff --git a/server/reds-private.h b/server/reds-private.h
index be93dea..878a306 100644
--- a/server/reds-private.h
+++ b/server/reds-private.h
@@ -85,8 +85,8 @@  struct RedsState {
     MainChannel *main_channel;
     InputsChannel *inputs_channel;
 
-    int mig_wait_connect; /* src waits for clients to establish connection to dest
-                             (before migration starts) */
+    bool mig_wait_connect; /* src waits for clients to establish connection to dest
+                              (before migration starts) */
     bool mig_wait_disconnect; /* src waits for clients to disconnect (after migration completes) */
     GList *mig_wait_disconnect_clients;/* List of RedsMigWaitDisconnectClient. Holds the clients
                                          which the src waits for their disconnection */
diff --git a/server/reds.c b/server/reds.c
index 2fddff6..8182856 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -430,7 +430,7 @@  static void reds_mig_cleanup(RedsState *reds)
             }
         }
         reds->mig_inprogress = false;
-        reds->mig_wait_connect = FALSE;
+        reds->mig_wait_connect = false;
         reds->mig_wait_disconnect = false;
         reds_core_timer_cancel(reds, reds->mig_timer);
         reds_mig_cleanup_wait_disconnect(reds);
@@ -1745,7 +1745,7 @@  static void reds_handle_main_link(RedsState *reds, RedLinkInfo *link)
     }
 
     reds->mig_inprogress = false;
-    reds->mig_wait_connect = FALSE;
+    reds->mig_wait_connect = false;
     reds->mig_wait_disconnect = false;
 
     reds_info_new_channel(link, connection_id);
@@ -2927,7 +2927,7 @@  static void reds_mig_started(RedsState *reds)
     spice_assert(reds->config->mig_spice);
 
     reds->mig_inprogress = true;
-    reds->mig_wait_connect = TRUE;
+    reds->mig_wait_connect = true;
     reds_core_timer_start(reds, reds->mig_timer, MIGRATE_TIMEOUT);
 }
 
@@ -2942,7 +2942,7 @@  static void reds_mig_fill_wait_disconnect(RedsState *reds)
     GLIST_FOREACH(reds->clients, iter, RedClient, client) {
         reds->mig_wait_disconnect_clients = g_list_append(reds->mig_wait_disconnect_clients, client);
     }
-    reds->mig_wait_connect = FALSE;
+    reds->mig_wait_connect = false;
     reds->mig_wait_disconnect = true;
     reds_core_timer_start(reds, reds->mig_timer, MIGRATE_TIMEOUT);
 }