[Spice-devel,spice-server,20/22] reds: use bool instead of gboolean

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

Details

Message ID 20170616091334.31475-21-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.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

Patch hide | download patch | download mbox

diff --git a/server/reds.c b/server/reds.c
index f8cf1d0..e4e2ace 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -78,7 +78,7 @@ 
 #define REDS_MAX_STAT_NODES 100
 
 static void reds_client_monitors_config(RedsState *reds, VDAgentMonitorsConfig *monitors_config);
-static gboolean reds_use_client_monitors_config(RedsState *reds);
+static bool reds_use_client_monitors_config(RedsState *reds);
 static void reds_set_video_codecs(RedsState *reds, GArray *video_codecs);
 
 static SpiceTimer *adapter_timer_add(const SpiceCoreInterfaceInternal *iface, SpiceTimerFunc func, void *opaque)
@@ -3503,18 +3503,18 @@  typedef struct {
     const char *name;
 } EnumNames;
 
-static gboolean get_name_index(const EnumNames names[], const char *name, uint32_t *index)
+static bool get_name_index(const EnumNames names[], const char *name, uint32_t *index)
 {
     if (name) {
         int i;
         for (i = 0; names[i].name; i++) {
             if (strcmp(name, names[i].name) == 0) {
                 *index = i;
-                return TRUE;
+                return true;
             }
         }
     }
-    return FALSE;
+    return false;
 }
 
 static const EnumNames renderer_names[] = {
@@ -3522,16 +3522,16 @@  static const EnumNames renderer_names[] = {
     {RED_RENDERER_INVALID, NULL},
 };
 
-static gboolean reds_add_renderer(RedsState *reds, const char *name)
+static bool reds_add_renderer(RedsState *reds, const char *name)
 {
     uint32_t index;
 
     if (reds->config->renderers->len == RED_RENDERER_LAST ||
         !get_name_index(renderer_names, name, &index)) {
-        return FALSE;
+        return false;
     }
     g_array_append_val(reds->config->renderers, renderer_names[index].id);
-    return TRUE;
+    return true;
 }
 
 static const EnumNames video_encoder_names[] = {
@@ -4347,20 +4347,20 @@  void reds_update_client_mouse_allowed(RedsState *reds)
     }
 }
 
-static gboolean reds_use_client_monitors_config(RedsState *reds)
+static bool reds_use_client_monitors_config(RedsState *reds)
 {
     GListIter it;
     QXLInstance *qxl;
 
     if (reds->qxl_instances == NULL) {
-        return FALSE;
+        return false;
     }
 
     FOREACH_QXL_INSTANCE(reds, it, qxl) {
         if (!red_qxl_use_client_monitors_config(qxl))
-            return FALSE;
+            return false;
     }
-    return TRUE;
+    return true;
 }
 
 static void reds_client_monitors_config(RedsState *reds, VDAgentMonitorsConfig *monitors_config)