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

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


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

diff --git a/server/reds-private.h b/server/reds-private.h
index 78571ac..227827d 100644
--- a/server/reds-private.h
+++ b/server/reds-private.h
@@ -107,7 +107,7 @@ struct RedsState {
     MonitorMode monitor_mode;
     SpiceTimer *mig_timer;
 
-    int vm_running;
+    bool vm_running;
     GList *char_devices; /* list of SpiceCharDeviceState */
     bool seamless_migration_enabled; /* command line arg */
 
diff --git a/server/reds.c b/server/reds.c
index 7363735..5b6bb1a 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3396,7 +3396,7 @@ static int do_spice_init(RedsState *reds, SpiceCoreInterface *core_interface)
     reds->mig_target_clients = NULL;
     reds->char_devices = NULL;
     reds->mig_wait_disconnect_clients = NULL;
-    reds->vm_running = TRUE; /* for backward compatibility */
+    reds->vm_running = true; /* for backward compatibility */
 
     if (!(reds->mig_timer = reds->core.timer_add(&reds->core, migrate_timeout, reds))) {
         spice_error("migration timer create failed");
@@ -4199,7 +4199,7 @@ SPICE_GNUC_VISIBLE void spice_server_vm_start(SpiceServer *reds)
 {
     GList *it;
 
-    reds->vm_running = TRUE;
+    reds->vm_running = true;
     for (it = reds->char_devices; it != NULL; it = it->next) {
         red_char_device_start(it->data);
     }
@@ -4210,7 +4210,7 @@ SPICE_GNUC_VISIBLE void spice_server_vm_stop(SpiceServer *reds)
 {
     GList *it;
 
-    reds->vm_running = FALSE;
+    reds->vm_running = false;
     for (it = reds->char_devices; it != NULL; it = it->next) {
         red_char_device_stop(it->data);
     }
-- 
2.9.4



More information about the Spice-devel mailing list